public void Log(string text, LogImportance level) { LogType t = LogType.Message; if (level == LogImportance.Medium) t = LogType.Warning; if (level == LogImportance.High) t = LogType.Error; Logger.Log(text, t); }
public void Log(string text, LogImportance Level) { lock (LogWriter) { if (Level >= MinimumImportance) LogWriter.WriteLine(text); LogWriter.Flush(); } }
/// <summary> /// Logs the given text at the given importance. /// </summary> public void Log(string text, LogImportance level) { lock (logWriter) { if (level >= MinimumImportance) logWriter.WriteLine(text); logWriter.Flush(); } }
/// <summary> /// Logs the given text. /// </summary> public void Log(string text, LogImportance logLevel) { foreach (ILogProvider provider in LogProviders) provider.Log(text, logLevel); }
public static void Log(string text, LogImportance importance) { foreach (ILogProvider provider in logProviders) provider.Log(text, importance); }
/// <summary> /// Creates a new logger to output messages at or above the specified /// importance to the given file. /// </summary> public FileLogWriter(string file, LogImportance minimumImportance) { this.MinimumImportance = minimumImportance; logWriter = new StreamWriter(file, true); }
/// <summary> /// Logs the given text at the given importance. /// </summary> public void Log(string text, LogImportance level) { if (level >= MinimumImportance) Console.WriteLine(text); }
public void LogMessage(LogImportance importance, string message, params object[] messageArgs) { _logger.LogMessage((MessageImportance)importance, message, messageArgs); }
public void LogMessage(LogImportance importance, string message, params object[] messageArgs) { }
public virtual ValueTask <string> Log(string Message, string Format, LogImportance Importance) { return(Log(string.Format(Format, Message), Importance)); }
/// <summary> /// Prints the object given in-game /// </summary> public void Log(LogType type, LogImportance importance, object obj) { this.logger.Log(type, importance, obj); }
/// <summary> /// Prints the message in-game /// </summary> public void Log(LogType type, LogImportance importance, string message) { this.logger.Log(type, importance, message); }
public void LogMessage(LogImportance importance, string message, params object[] messageArgs) { Messages.Add($"{MessagePrefix}: {message}"); }
public static string LogImportanceToString(LogImportance l) { switch (l) { case LogImportance.Critical: return "Error"; case LogImportance.High: case LogImportance.Low: case LogImportance.Medium: return "Warning"; case LogImportance.Remark: return "Info"; } return ""; }
public abstract ValueTask <string> Log(string Message, LogImportance Importance);
/// <summary> /// Prints the object given in-game /// </summary> public void Log(LogType type, LogImportance importance, object obj) { this.Log(type, importance, obj.ToString()); }
/// <summary> /// Prints the messages in-game /// </summary> public void Log(LogType type, LogImportance importance, string format, params object[] messages) { this.Log(type, importance, string.Format(format, messages)); }
public void Log(string Text, LogImportance LogLevel) { foreach (var provider in LogProviders) provider.Log(Text, LogLevel); }
public virtual T Log <T>(T Object, LogImportance Importance) { Log(Object.ToString(), Importance); return(Object); }
/// <summary> /// Creates a new logger with the provided minimum importance. /// </summary> public ConsoleLogWriter(LogImportance minimumImportance) { this.MinimumImportance = minimumImportance; }
public virtual T Log <T>(T Object, string Format, LogImportance Importance) { Log(string.Format(Format, Object), Importance); return(Object); }
public void AddEvent(LogImportance importance, string TestName, string entry) { LogStruct ls = new LogStruct(); ls.importance = importance; ls.LogEntry = entry; ls.TestName = TestName; LogList.Add(ls); if (this.OnEventLog != null) OnEventLog((IUPnPTestGroup)this, ls); }
public virtual string Format(DateTime Time, LogImportance Importance, string Region, string Message) { return('[' + Time.ToString(DateTimeFormat) + ']' + Symbol(Importance) + Region + '|' + Message); }
public override ValueTask <string> Log(string Message, LogImportance Importance) { System.Diagnostics.Debug.WriteLine(Message, Format(DateTime.Now, Importance, Region, Message)); return(new ValueTask <string>(Message)); }
public virtual ValueTask <string> Log(Exception e, LogImportance Importance) { return(Log(e.ToString(), Importance)); }
private int getImageIndexForLogImportance(LogImportance li) { switch (li) { case LogImportance.Critical: return 10; case LogImportance.Remark: return 12; default: return 11; } }
public virtual ValueTask <string> Log(Exception e, string Format, LogImportance Importance) { return(Log(string.Format(Format, e), Importance)); }
public void LogMessage(LogImportance importance, string message, params object[] messageArgs) { _output.WriteLine(message, messageArgs); }
public FileLogWriter(string File, LogImportance MinimumImportance) { this.MinimumImportance = MinimumImportance; LogWriter = new StreamWriter(File, true); }