public Task WriteLine(MetaLogEntity item) { switch (item.Severity) { case MetaLogErrorSeverity.Critical: case MetaLogErrorSeverity.Error: Console.ForegroundColor = ConsoleColor.Red; break; case MetaLogErrorSeverity.Warning: Console.ForegroundColor = ConsoleColor.DarkYellow; break; case MetaLogErrorSeverity.Info: Console.ForegroundColor = ConsoleColor.DarkGray; break; case MetaLogErrorSeverity.Debug: case MetaLogErrorSeverity.Trace: Console.ForegroundColor = ConsoleColor.White; break; default: Console.ForegroundColor = ConsoleColor.White; break; } Console.WriteLine(item); return(Task.CompletedTask); }
void Log(string message, MetaLogErrorSeverity severity, string stackTrace = null) { var item = new MetaLogEntity() { Source = this.Name, Timestamp = DateTime.Now, Message = message, Severity = severity, StackTrace = stackTrace }; Queue.Enqueue(item); }
public Task WriteLine(MetaLogEntity item) { Debug.WriteLine(item); return(Task.CompletedTask); }
Task ConsoleLogger_WriteLine(MetaLogEntity arg0) { return(ConsoleLogger.WriteLine(arg0)); }
Task TraceLogger_WriteLine(MetaLogEntity arg0) { return(TraceLogger.WriteLine(arg0)); }
Task Split_Put(MetaLogEntity arg0) { return(Split.Put(arg0)); }