im Code:
public class Myclass
{
protected static ILog log = log4net.LogManager.GetLogger("System.Windows.Forms");
public static void TestLog()
{
log.Info("UpdateStockValues"+DateTime.Now);
}
}
in App.config:
nach Level filtern im Appender (loggt keine Info und Debug)
Levels:
•ALL
•DEBUG
•INFO
•WARN
•ERROR
•FATAL
•OFF
Beispiel für config die mittels root logger alles loggt in 3 Appender: file, datenbank und email:
No comments:
Post a Comment