public static void Info(string message, string tag = "INFO") { InitializeIfNotSetup(); LOGMessage msg = new LOGMessage(message, tag, LogSeverity.Info); Instance.LogMessage(msg); }
public static void Warning(string message, string tag = "Warn") { InitializeIfNotSetup(); LOGMessage msg = new LOGMessage(message, tag, LogSeverity.Warning); Instance.LogMessage(msg); }
public static void Error(string message, string tag = "Error") { InitializeIfNotSetup(); LOGMessage msg = new LOGMessage(message, tag, LogSeverity.Error); Instance.LogMessage(msg); }
public static void Fatal(string message, string tag = "Fatal") { InitializeIfNotSetup(); LOGMessage msg = new LOGMessage(message, tag, LogSeverity.Fatal); Instance.LogMessage(msg); }
public static void Trace(string message, string tag = "TRACE") { InitializeIfNotSetup(); LOGMessage msg = new LOGMessage(message, tag, LogSeverity.Trace); Instance.LogMessage(msg); }
public static void Debug(string message, string tag = "DBG") { InitializeIfNotSetup(); LOGMessage msg = new LOGMessage(message, tag, LogSeverity.Debug); Instance.LogMessage(msg); }
/// <summary> /// forwards message to all outputters /// </summary> /// <param name="message"></param> public void HandleMessage(LOGMessage message) { if (message.LogSeverity > SeverityFilter) { return; } foreach (KeyValuePair <string, string> additionalField in _additionalFields) { message.AdditionalFields.Add(additionalField.Key, additionalField.Value); } lock (_outputter) { foreach (ILogOutput logOutput in _outputter) { logOutput.HandleMessage(message); } } }
/// <summary> /// Handles a externaly created <see cref="LOGMessage"/> /// </summary> /// <param name="message">the instance to be handled by the log system</param> public abstract void LogMessage(LOGMessage message);
/// <inheritdoc/> public override void LogMessage(LOGMessage message) { HandleMessage(message); }
/// <inheritdoc/> public override void Trace(string message, string tag = "TRACE") { LOGMessage msg = new LOGMessage(message, tag, LogSeverity.Trace); HandleMessage(msg); }
/// <inheritdoc/> public override void Debug(string message, string tag = "DBG") { LOGMessage msg = new LOGMessage(message, tag, LogSeverity.Debug); HandleMessage(msg); }
/// <inheritdoc/> public override void Info(string message, string tag = "INFO") { LOGMessage msg = new LOGMessage(message, tag, LogSeverity.Info); HandleMessage(msg); }
/// <inheritdoc/> public override void Warning(string message, string tag = "Warn") { LOGMessage msg = new LOGMessage(message, tag, LogSeverity.Warning); HandleMessage(msg); }
/// <inheritdoc/> public override void Error(string message, string tag = "Error") { LOGMessage msg = new LOGMessage(message, tag, LogSeverity.Error); HandleMessage(msg); }
/// <inheritdoc/> public override void Fatal(string message, string tag = "Fatal") { LOGMessage msg = new LOGMessage(message, tag, LogSeverity.Fatal); HandleMessage(msg); }