// Using the LogManager to get the logger using (var logger = NLog.LogManager.GetCurrentClassLogger()) { logger.Warn("There may be a potential issue with the application."); }
// Using a custom logger with the Warn level var myLogger = NLog.LogManager.GetLogger("MyApplicationLogger"); myLogger.Warn("Warning message: potential issue detected.");
Install-Package NLog