Beispiel #1
0
        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);
        }
Beispiel #2
0
        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));
        }
Beispiel #3
0
 public abstract LogEntry_I OnLog(LogSignal_I info, LogEntry_I entry);