Answers for "log4net get log file path programmatically"

0

log4net get log file path programmatically

var rootAppender = ((Hierarchy)LogManager.GetRepository())
                                         .Root.Appenders.OfType<FileAppender>()
                                         .FirstOrDefault();

string filename = rootAppender != null ? rootAppender.File : string.Empty;
Posted by: Guest on August-23-2021

Browse Popular Code Answers by Language