nathanwoulfe / Plumber

The workflow solution for Umbraco 7
39 stars 20 forks source link

AsynchronousRollingFileAppender Exception #133

Closed samtruedig closed 4 years ago

samtruedig commented 4 years ago

Describe the bug We are running an Umbraco 7.15.3 site in Umbraco Cloud, and our staging application wouldn't respond or restart. Log had many exceptions related like:

Unhandled exception in AppDomain (terminating) System.NullReferenceException: Object reference not set to an instance of an object. at log4net.Appender.FileAppender.Append(LoggingEvent loggingEvent) at Umbraco.Core.Logging.AsynchronousRollingFileAppender.OnClose() at log4net.Appender.AppenderSkeleton.Close() at log4net.Appender.AppenderSkeleton.Finalize() at log4net.Appender.RollingFileAppender.Finalize()

Umbraco Cloud SWAT team resolved by moving the app to another server and responded with the following as regards the source of the error: "This is related to the known issue about the log config. They are using custom log configuration which is using a deprecated log appended Umbraco.Core.Logging.AsynchronousRollingFileAppender The same issue will occur because three environments can log to the same file, but only one get access to that file, there for the underlying exception was not caught."

In our application this configuration was added by Plumber.

Plumber version 1.1.11

Additional context Deprecated: https://our.umbraco.com/apidocs/v7/csharp/api/Umbraco.Core.Logging.AsynchronousRollingFileAppender.html

nathanwoulfe commented 4 years ago

Hi Sam, I'll fix that today.

nathanwoulfe commented 4 years ago

@samtruedig this can be patched in your site by updating log4net.config to

Not sure why this was ever using the async appender. I'll publish a release too, but updating the config is probably a quick and easy fix until you can update the package to the new version.
samtruedig commented 4 years ago

thanks @nathanwoulfe

nathanwoulfe commented 4 years ago

@samtruedig 1.1.13 is on nuget now - I've added a migration to revert the log4net config to a regular file appender, not sure why I ever used the async one...