Exemple #1
0
        public void Log <TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func <TState, Exception, string> formatter)
        {
            if (!IsEnabled(logLevel))
            {
                return;
            }

            string message = GetCategoryPrefix(_category) + formatter(state, exception);

            ShellLogger.OnLog(new LogEventArgs(logLevel.ToManagedShellLogSeverity(), message, exception, DateTime.Now));
        }