Try our conversational search powered by Generative AI!

Loggin not working after upgrade



After upgrading a 7.5 site with CMS + Realte to EpiServer 9, somehow all logging stopped working. I'm not entirely sure when it stopped working, but i think it wasright after upgrade. I'm been going through all configs and files for days now without any luck. I've re-installed NuGet's, replaced EPiServerLog.config with the most basic file there is, and i have tried to point logging to a folder with "Everyone full control" rights (even thought plenty of sites logg to the same folder), nothing seems to help.

Any suggestions are welcome! I'm sure i've missed the most basic thing in the world...

Jun 07, 2016 13:57

do you have log4net still around? which version?

Jun 07, 2016 14:23

Check out the breaking changes in Episerver 9 and use the ILogger interface (not the old ILog interface). Also check the nuget package for logging. 

Excerp from docs:


Removal of EPiServer.Logging.Log4Net dependency

Who/what is affected:

Sites using log4net for logging may have to re-install the EPiServer.Logging.Log4net package.


EPiServer.CMS.Core no longer has a dependency on EPiServer.Logging.Log4Net. This breaking change lets you run on the latest version of Log4Net or use another provider. See Logging.

Because of this change, the NuGet package, EPiServer.Logging.Log4Net, may be removed by NuGet when you upgrade to CMS 9. You need to manually ensure that the package is installed by inspecting packages.config. You also may get the following error, which indicates EPiServer.Logging.Log4Net was uninstalled:

System.TypeLoadException: Method 'Log' in type 'Log4NetLogger' from assembly 'EPiServer.Logging.Log4Net, Version=, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' does not have an implementation.

Install the EPiServer.Logging.Log4Net package to get a supported version (version 1.1 or higher).

NoteEPiServer.Logging.Log4Net 1.1.0 uses the old log4net 1.2.10 which is the last version using the old signature, EPiServer.Logging.Log4Net 2.0.0 uses new versions of log4net. See log4net home page for details.

Additional parameter in Log method of ILogger interface

Who/what is affected:

Custom logging frameworks implementing the EPiServer.Logging.ILogger interface to provide custom logging functionality.


An additional parameter representing the logger framework boundary type was added to the Log method of the ILogger interface. This is required by the Log4Net implementation to correctly resolve the logging location when using logging extension methods and can be useful for other logging frameworks for the same reasons. If you have implemented your own custom Logger implementation, you can add the new argument to your implementation and ignore the passed value.

Jun 07, 2016 14:27

I might be wrong here, but my researches shows that EPiServer.Common.Framework.Impl.dll has a reference on log4net.dll version with public token 1b44e1d426115821, while EPiServer.Logging.log4net has a reference on log4net using the new public token 669e0ddf0bb1aa2a. And since the public token has changed, there's no way to do a assembly redirect either.

The only working solution (or workaround) i found was to downgrade EPiServer.Logging.log4net to version 1.1.

Jun 07, 2016 20:35

Jonas, there is a workaround to have more than 1 log4net versions running in your appdomain.

Jun 08, 2016 9:27

That seems to be a nice solution Valdis. I might try that one later on, but right now i am quite happy just to have logging :) 

Jun 08, 2016 10:00
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.