Try our conversational search powered by Generative AI!

Log4net issue

Vote:
 

Episerver is not writing custom and internal logs together. It writes custom logs with the below code in Application_start event but not internal logs. Without the below code it writes internal logs but not custom logs. Its always either or

 

var logfile = new System.IO.FileInfo(HttpContext.Current.Server.MapPath("log4net.config"));

XmlConfigurator.ConfigureAndWatch(logfile);

 

 Also in the log4net trace I noticed its trying to load old version of log4net (1.2.10.0) though we upgraded to 1.2.11.0 version.

Where should I check the Episerver log4net versions? Or how can I find out where its using the older version ?

 

Please help!

#88468
Jul 14, 2014 23:01
Vote:
 

Hi,

The version of log4net should be configurable via assembly dependentAssembly section in web.config.

Add/modify this section in your web.config:




Regards.

/Q

#88473
Edited, Jul 15, 2014 6:08
Vote:
 

Hi Quan, I did try changing the dependentAssembly in web.config to

 


but NO luck. 

Also found through Process Explorer, a few process using the old version 1.2.10.0 of log4net from GAC including Episerver.scheduler.svc and noticed these are running on .net framework 2.0.

Trying many things, finally we decided to use a separate config and log file for custom logs and another config and log file for internal logs . Which does what we need ! But still curious why is it still using old version of log4net in a few places. 

On a side note I noticed the base Episerver folder has old 1.2.10.0 dlls which I replaced to new 1.2.11.0 that didnt help either. 

Please share any thoughts or ideas you may have!

Thanks in advance!

#88519
Jul 15, 2014 18:21
Vote:
 

Note that the publicKeyToken should be 1b44e1d426115821 instead of 669e0ddf0bb1aa2a. You might want to take a look here:

http://stackoverflow.com/questions/8743992/how-do-i-work-around-log4net-keeping-changing-publickeytoken

/Q

#88523
Jul 16, 2014 1:11
Vote:
 

Unfortunately It didnt work in our case.
The issue was C:\EpiServer\eCommerceFramework\5.2\XavierCommerceManager\Sites\IntegrationService\bin  had the old version of dll and replacing that with the new version solved the issue.

Thanks and appreciate your help Quan!

#88553
Jul 16, 2014 18:16
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.