Esempio n. 1
0
        public static void LogNavigation <T>(this ILogger Logger, T LogObject, int EventId)
        {
            var Event = new ScreamingEvent <T> {
                EventId = EventId,
                Event   = LogObject
            };


            Logger.LogInformation(EventId, JsonConvert.SerializeObject(Event));
        }
Esempio n. 2
0
 public void Log <TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func <TState, Exception, string> formatter)
 {
     if (eventId.Id < 1000)
     {
         var Event = new ScreamingEvent <string> {
             EventId = eventId.Id,
             Event   = state.ToString()
         };
         _redis.ListLeftPush(KEY_logKey, JsonConvert.SerializeObject(Event));
     }
     else
     {
         _redis.ListLeftPush(KEY_logKey, state.ToString());
     }
 }