You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating from version 2.0.15 to 3.0.0, our logging isn't being written. I've managed to isolate this to using GlobalContext properties within the file name, although I suspect anywhere properties are used are also a problem. I've boiled our code down to the minimal set needed to reproduce the issue:
Program.cs:
staticvoidMain(string[]args){
log4net.GlobalContext.Properties["mycustomusername"]="me";Configurationconfiguration= ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);FileInfologfile=new FileInfo(configuration.FilePath);
XmlConfigurator.ConfigureAndWatch(logfile);var_log= log4net.LogManager.GetLogger(typeof(Program));longvalue=0;while(true){
_log.Debug($"New value is: {value++}");
Thread.Sleep(1000);}}
This message appears in the console window:
log4net:WARN Unable to set property [file] on object [log4net.Appender.RollingFileAppender] using value [f:\temp%property{mycustomusername}TestAppLog.log] (with acceptable conversion types)
The text was updated successfully, but these errors were encountered:
FreeAndNil
changed the title
Logging is not generated after upgrading to 3.0
Logging is not generated after upgrading to 3.0 (duplicate of #183)
Sep 26, 2024
After updating from version 2.0.15 to 3.0.0, our logging isn't being written. I've managed to isolate this to using GlobalContext properties within the file name, although I suspect anywhere properties are used are also a problem. I've boiled our code down to the minimal set needed to reproduce the issue:
Program.cs:
App.Config:
This message appears in the console window:
log4net:WARN Unable to set property [file] on object [log4net.Appender.RollingFileAppender] using value [f:\temp%property{mycustomusername}TestAppLog.log] (with acceptable conversion types)
The text was updated successfully, but these errors were encountered: