November Happy Hour will be moved to Thursday December 5th.

Log4net stopped working

Vote:
 

Hi.

I've noticed that for a while back my logging has stopped working. Looking at the internal debugging info of Log4net and comparing it to a project that is working, it doesn't seem to find EPiServer.Logging.Log4Net?

Any ideas?

Web.config

      
        
        
      
      
        
        
      

EPiServerLog.config



  
    
    
    
    
    
    
    
    
    
    
      
    
  

  
  
    
  
  
    
  
  
    
  
  
    
  
  
    
  

  
    
    
  

Log4net internal debugging

log4net: log4net assembly [log4net, Version=2.0.7.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a]. Loaded from [C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\44134a67\53c02a36\assembly\dl3\fcf19adf\0080f5a6_b964d201\log4net.dll]. (.NET Runtime [4.0.30319.42000] on Microsoft Windows NT 10.0.15063.0)
log4net: defaultRepositoryType [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository for assembly [MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]
log4net: Assembly [MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From [C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\44134a67\53c02a36\assembly\dl3\66e7cec6\d4190289_7f75d301\MyAssembly.dll]
log4net: Assembly [MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a RepositoryAttribute specified.
log4net: Assembly [MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] using repository [log4net-default-repository] and repository type [log4net.Repository.Hierarchy.Hierarchy]
log4net: Creating repository [log4net-default-repository] using type [log4net.Repository.Hierarchy.Hierarchy]
#186277
Dec 15, 2017 10:00
Vote:
 

Not sure if this be helpful, but are you by any chance creatinging a class level static variable to use log4net in Global.ascx?

#186285
Dec 15, 2017 13:03
Vote:
 

Yeah, I saw that as a possible issue when googling around too. Unfortunatly nothing fishy is going on in my Global.asax.

#186322
Dec 17, 2017 17:54
Vote:
 

Have tried to reinstall the Episerver.Logging.Log4Net nuget package?

#186326
Dec 18, 2017 6:55
Vote:
 

I upgraded my solution to the to latest one and the logging started to work. So I'll leave it like that. Thanks!

#186329
Dec 18, 2017 8:57
* 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.