I found out that a specific version of ILog.WarnFormat does not log at the correct level. This is an odd use case, but I have missed log messages due this bug. Here's an example code snippet to reproduce:
var logger = EPiServer.Logging.Compatibility.LogManager.GetLogger("Test.Log");
logger.WarnFormat(CultureInfo.InvariantCulture, "This should show at the WARN level: {0}", new [] { "param-1" });
Here is the output I found in my log file with appropriate settings to show INFO level:
2021-04-30 12:59:13,790 [5] INFO Test.Log: This should show at the WARN level: param-1
ILog has been a compatibility wrapper for ILogger for quite some time. As a quick-fix you can try using the ILogger interface directly. It should not have this bug.
I found out that a specific version of ILog.WarnFormat does not log at the correct level. This is an odd use case, but I have missed log messages due this bug.
Here's an example code snippet to reproduce:
Here is the output I found in my log file with appropriate settings to show INFO level: