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:
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=184.108.40.206, 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).
Note: EPiServer.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.
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.
I might be wrong here, but my researches shows that EPiServer.Common.Framework.Impl.dll has a reference on log4net.dll version 220.127.116.11 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.
Jonas, there is a workaround to have more than 1 log4net versions running in your appdomain.
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 :)
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...