public void Write(string message, LogLevel logLevel) { if ((logLevel > LogLevel.Debug) || Common.Flags.Verbose) { _logger.Log(GetLogLevel(logLevel), message); } }
public void Write(string message, LogLevel logLevel) { if (logLevel < Level) return; lock (locker) File.AppendAllText(path, message + "\r\n"); }
public void Write(string message, LogLevel logLevel) { if (logLevel < Level) { return; } logger.Add(message); }
public void Write(string message, LogLevel logLevel) { if (logLevel < Level) { return; } if (logger == null) { logger = Logger.GetLogger("updater"); } logger.Add(message); }
static NLog.LogLevel GetLogLevel(LogLevel logLevel) { switch (logLevel) { case LogLevel.Debug: return NLog.LogLevel.Debug; case LogLevel.Info: return NLog.LogLevel.Info; case LogLevel.Warn: return NLog.LogLevel.Warn; case LogLevel.Error: return NLog.LogLevel.Error; case LogLevel.Fatal: return NLog.LogLevel.Fatal; default: throw new ArgumentOutOfRangeException(nameof(logLevel), logLevel, null); } }
public void Write(string message, LogLevel logLevel) { switch (logLevel) { case LogLevel.Debug: { Logger.Debug(message); break; } case LogLevel.Info: { Logger.Info(message); break; } case LogLevel.Error: { Logger.Error(message); break; } case LogLevel.Fatal: { Logger.Fatal(message); break; } case LogLevel.Warn: { Logger.Warn(message); break; } default: throw new ArgumentOutOfRangeException(nameof(logLevel), logLevel, null); } }
static NLog.LogLevel GetLogLevel(LogLevel logLevel) { switch (logLevel) { case LogLevel.Debug: return(NLog.LogLevel.Debug); case LogLevel.Info: return(NLog.LogLevel.Info); case LogLevel.Warn: return(NLog.LogLevel.Warn); case LogLevel.Error: return(NLog.LogLevel.Error); case LogLevel.Fatal: return(NLog.LogLevel.Fatal); default: throw new ArgumentOutOfRangeException(nameof(logLevel), logLevel, null); } }
public void Write(string message, LogLevel logLevel) { logger.Log(NLogLogLevelToSplatLogLevel(logLevel), message); }
public void Write(string message, LogLevel logLevel) { _logger.Log(GetLogLevel(logLevel), message); }
private static global::Exceptionless.Logging.LogLevel RxUitoExceptionlessLevel(LogLevel logLevel) { var mappings = new[] { new Tuple <LogLevel, global::Exceptionless.Logging.LogLevel>(LogLevel.Debug, global::Exceptionless.Logging.LogLevel.Debug), new Tuple <LogLevel, global::Exceptionless.Logging.LogLevel>(LogLevel.Info, global::Exceptionless.Logging.LogLevel.Info), new Tuple <LogLevel, global::Exceptionless.Logging.LogLevel>(LogLevel.Warn, global::Exceptionless.Logging.LogLevel.Warn), new Tuple <LogLevel, global::Exceptionless.Logging.LogLevel>(LogLevel.Error, global::Exceptionless.Logging.LogLevel.Error), new Tuple <LogLevel, global::Exceptionless.Logging.LogLevel>(LogLevel.Fatal, global::Exceptionless.Logging.LogLevel.Error) }; return(mappings.First(x => x.Item1 == logLevel).Item2); }
/// <summary> /// Writes a message at the specified log level /// </summary> /// <param name="message">The message to write.</param> /// <param name="logLevel">The log level to write the message at.</param> public void Write(String message, LogLevel logLevel) { this.CreateLog(message, RxUitoExceptionlessLevel(logLevel)); }
/// <summary>Writes a messge to the target.</summary> /// <param name="message">The message.</param> /// <param name="type">The type.</param> /// <param name="logLevel">The log level.</param> public void Write(string message, Type type, LogLevel logLevel) { logger.Log(NLogLogLevelToSplatLogLevel(logLevel), message, type); }
public void Write(string message, LogLevel logLevel) { if ((logLevel > LogLevel.Debug) || Common.Flags.Verbose) _logger.Log(GetLogLevel(logLevel), message); }