Ejemplo n.º 1
0
        public void LogExtraProperties()
        {
            var logger = new MiddyLogger(lambdaLogger);

            logger.Log(LogLevel.Info, "hello world", new LogProperty("key", "value"));

            Approvals.Verify(receivedLog);
        }
Ejemplo n.º 2
0
        public void LogLevelAndMessage()
        {
            var logger = new MiddyLogger(lambdaLogger);

            logger.Log(LogLevel.Debug, "hello world");

            Approvals.Verify(receivedLog);
        }
Ejemplo n.º 3
0
        public void LogExtraPropertiesWithObject()
        {
            var classToLog = new ClassToLog
            {
                Property1 = "The value of property1",
                Property2 = "The value of property2"
            };

            var logger = new MiddyLogger(lambdaLogger);

            logger.Log(LogLevel.Info, "hello world", new LogProperty("key", classToLog));

            Approvals.Verify(receivedLog);
        }