Migration to the newer logging API.
logInternal(): invalid patterns are processed better.