コード例 #1
0
 public DynamicFileAppender(string loggerName, string appenderName,
                            string logfileName, string conversionPattern, string levelName = "ALL")
 {
     _loggerName = loggerName;
     _appender   = FileAppenderFactory.CreateFileAppender(appenderName, logfileName, conversionPattern);
     FileAppenderFactory.AddAppender(loggerName, levelName, _appender);
     _log = LogManager.GetLogger(loggerName);
 }
コード例 #2
0
 public void Dispose()
 {
     _appender.Close();
     FileAppenderFactory.RemoveAppender(_loggerName, _appender);
     _log = null;
 }