예제 #1
0
        public static void Alert(this NLog.Logger logger, LumberjackAlertMessage message)
        {
            if (message == null || message.Source == null || message.ApplicationId == null || message.Component == null)
            {
                return;
            }

            var info = new LogEventInfo
            {
                Level = LogLevel.Trace,
            };

            info.Properties.Add("data", message);
            logger.Log(typeof(LoggerExtensions), info);
        }
예제 #2
0
        public static void Alert(this NLog.Logger logger, LumberjackAlertMessage message)
        {
            if (message == null || message.Source == null || message.ApplicationId == null || message.Component == null)
            {
                return;
            }

            var info = new LogEventInfo
            {
                Level = LogLevel.Trace,
            };

            info.Properties.Add("data", message);
            logger.Log(typeof(LoggerExtensions), info);
        }