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
usingSystem;usingNLog;classProgram{staticvoidMain(string[]args){// create a configuration instancevarconfig=newNLog.Config.LoggingConfiguration();// create a console logging targetvarlogConsole=newNLog.Targets.ConsoleTarget();// create a debug output logging targetvarlogDebug=newNLog.Targets.OutputDebugStringTarget();// send logs with levels from Info to Fatal to the consoleconfig.AddRule(NLog.LogLevel.Info,NLog.LogLevel.Fatal,logConsole);// send logs with levels from Debug to Fatal to the consoleconfig.AddRule(NLog.LogLevel.Debug,NLog.LogLevel.Fatal,logDebug);// apply the configurationNLog.LogManager.Configuration=config;// create a loggervarlogger=LogManager.GetCurrentClassLogger();// logginglogger.Trace("Trace message");logger.Debug("Debug message");logger.Info("Info message");logger.Warn("Warning message");logger.Error("Error message");logger.Fatal("Fatal message");}}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: