public override LogEntry_I OnLog(LogSignal_I info, LogEntry_I entry) { if (info == null) { return(null); } Console.WriteLine(info.Exception?.Message); if (info.Message?.Message?.Value != null) { Console.WriteLine(info.Message.Message.Value); } return(null); }
public LogEntry_I Log <TMessageType>(LogSignal_I logSignal) { if (logSignal == null) { return(null); } if (logSignal?.Message != null && logSignal.Message.MessageType == null) { // if the message type is lready set, then save time and no need to do this step. logSignal.Message.MessageType = typeof(TMessageType); } if (!CanLog(logSignal.GlobalContext, logSignal.LogLevel)) { return(null); } LogEntry_I entry = CreateLogEntry(logSignal); return(OnLog(logSignal, entry)); }
public abstract LogEntry_I OnLog(LogSignal_I info, LogEntry_I entry);