Esempio n. 1
0
 public static void OnActionExecuted(this ILogChannel loggerEngine, string category, LogLevel level, IActionContext actionContext)
 {
     loggerEngine.Log(GetLogString(
                          "Action '{0}' execution has done with folowing information:",
                          level,
                          actionContext,
                          actionContext.ActionDescriptor,
                          true
                          ));
 }
Esempio n. 2
0
        public SemanticLogTests()
        {
            channels.Add(channel);

            A.CallTo(() => channel.Log(A <SemanticLogLevel> .Ignored, A <string> .Ignored))
            .Invokes((SemanticLogLevel level, string message) =>
            {
                output = message;
            });

            log = new Lazy <SemanticLog>(() => new SemanticLog(channels, appenders, () => new JsonLogWriter()));
        }
Esempio n. 3
0
        public SemanticLogTests()
        {
            options.Value.Level = SemanticLogLevel.Trace;

            channels.Add(channel);

            A.CallTo(() => channel.Log(A <SemanticLogLevel> .Ignored, A <string> .Ignored))
            .Invokes((SemanticLogLevel level, string message) =>
            {
                output += message;
            });

            log = new Lazy <SemanticLog>(() => new SemanticLog(options, channels, appenders, JsonLogWriterFactory.Default()));
        }
Esempio n. 4
0
        public SemanticLogAdapterTests()
        {
            channels.Add(channel);

            A.CallTo(() => channel.Log(A <SemanticLogLevel> .Ignored, A <string> .Ignored))
            .Invokes((SemanticLogLevel level, string message) =>
            {
                output = message;
            });

            log = new Lazy <SemanticLog>(() => new SemanticLog(channels, new List <ILogAppender>(), () => new JsonLogWriter()));

            sut = new SemanticLogLoggerProvider(log.Value);
        }
Esempio n. 5
0
        public SemanticLogAdapterTests()
        {
            options.Value.Level = SemanticLogLevel.Trace;

            channels.Add(channel);

            A.CallTo(() => channel.Log(A <SemanticLogLevel> ._, A <string> ._))
            .Invokes((SemanticLogLevel level, string message) =>
            {
                output = message;
            });

            log = new Lazy <SemanticLog>(() => new SemanticLog(options, channels, new List <ILogAppender>(), JsonLogWriterFactory.Default()));

            sut = SemanticLogLoggerProvider.ForTesting(log.Value);
        }