public static void Error(string text) { Write("Error", text); var eventArgs = new LoggerLogEventArgs { Level = "Error", Message = text }; OnError?.Invoke(eventArgs, eventArgs); }
public static void Warning(string text) { Write("Warning", text); var eventArgs = new LoggerLogEventArgs { Level = "Warning", Message = text }; OnWarning?.Invoke(eventArgs, eventArgs); }
public static void Info(string text) { Write("Info", text); var eventArgs = new LoggerLogEventArgs { Level = "Info", Message = text }; OnInfo?.Invoke(eventArgs, eventArgs); }
public static void Log(string level, string text) { Write(level, text); var eventArgs = new LoggerLogEventArgs { Level = level, Message = text }; OnLog?.Invoke(eventArgs, eventArgs); }
public static void SystemLog(string text) { Write("SystemLog", text); var eventArgs = new LoggerLogEventArgs { Level = "Info", Message = text }; if (OnInfo != null) { OnInfo.Invoke(eventArgs, eventArgs); } }
//public static void LogStart() { BeginWrite(); } //public static void LogEnd() { CommitWrite(); } public static void Log(string level, string text) { lock (dbLock) { buffer.Enqueue(new LogMessageParammeter { Level = level, Message = text }); } //Write(level, text); var eventArgs = new LoggerLogEventArgs { Level = level, Message = text }; if (OnLog != null) { OnLog.Invoke(eventArgs, eventArgs); } }