Пример #1
0
 protected override void ConfigureLogging(ILoggingBuilder logging, IExecutionEnvironment executionEnvironment)
 {
     logging.AddConfiguration(Configuration.GetSection("Logging"));
     logging.AddLambdaLogger(Configuration, "Logging");
     //#if (AddLoggly)
     logging.AddLoggly(Configuration.GetSection("Loggly"));
     //#endif
 }
Пример #2
0
 protected void ConfigureLogging(ILoggingBuilder logging)
 {
     logging.AddConfiguration(Configuration.GetSection("Logging"));
     logging.AddLambdaLogger(new LambdaLoggerOptions
     {
         IncludeCategory = true,
         IncludeLogLevel = true,
         IncludeNewline  = true
     });
 }
Пример #3
0
        protected override void ConfigureLogging(ILoggingBuilder logging, IExecutionEnvironment executionEnvironment)
        {
            logging.AddConfiguration(Configuration.GetSection("Logging"));

            logging.AddLambdaLogger(new LambdaLoggerOptions
            {
                IncludeCategory = true,
                IncludeLogLevel = true,
                IncludeNewline  = true
            });
        }
Пример #4
0
        private void SetDefaultLoggingConfiguration(ILoggingBuilder logging, IConfiguration configuration)
        {
            logging.AddConfiguration(configuration.GetSection("Logging"));

            logging.AddLambdaLogger(new LambdaLoggerOptions
            {
                IncludeCategory = true,
                IncludeLogLevel = true,
                IncludeNewline  = true
            });
        }
        /// <summary>
        /// ロガーの設定を行います。
        /// </summary>
        /// <param name="logging">logging</param>
        protected void ConfigureLogger(ILoggingBuilder logging)
        {
            var loggerOptions = new LambdaLoggerOptions
            {
                IncludeCategory  = true,
                IncludeLogLevel  = true,
                IncludeNewline   = true,
                IncludeEventId   = true,
                IncludeException = true
            };

            logging.AddLambdaLogger(loggerOptions);
        }
Пример #6
0
        private void SetupLogging(ILoggingBuilder logging, IConfiguration config)
        {
            var opts = new LambdaLoggerOptions(config);

            // var opts = new LambdaLoggerOptions
            // {
            //     IncludeCategory = true,
            //     IncludeEventId = true,
            //     IncludeException = true,
            //     IncludeLogLevel = true,
            //     IncludeNewline = true,
            //     IncludeScopes = true,
            // }

            logging.AddLambdaLogger(opts);
        }
        private void ConfigureLogging(ILoggingBuilder logging)
        {
            var loggingConfig = _configuration.GetSection("Logging");

            logging.ClearProviders();
            logging.AddConfiguration(loggingConfig);
            logging.AddEventSourceLogger();

            if (_environment.IsDevelopment())
            {
                logging.AddDebug();
                logging.AddConsole();
            }
            else
            {
                logging.AddLambdaLogger(new LambdaLoggerOptions(loggingConfig));
            }
        }
Пример #8
0
        protected override void ConfigureLogging(ILoggingBuilder logging, IExecutionEnvironment executionEnvironment)
        {
            // Use this method to configure the logging

            logging.AddConfiguration(Configuration.GetSection("Logging"));

            /* Pushes the valid log entries into the CloudWatch log group created for this Lambda function */
            logging.AddLambdaLogger(new LambdaLoggerOptions
            {
                IncludeCategory = true,
                IncludeLogLevel = true,
                IncludeNewline  = true,
                Filter          = (categoryName, logLevel) =>
                {
                    /* Here you can filter which logs should go to CloudWatch. */

                    return(logLevel >= LogLevel.Information);
                }
            });
        }
Пример #9
0
        protected virtual void ConfigureLogging(WebHostBuilderContext context, ILoggingBuilder logging)
        {
            logging.AddConfiguration(context.Configuration.GetSection("Logging"));

            if (context.HostingEnvironment.IsDevelopment())
            {
                logging.AddConsole();
            }
            else
            {
                logging.AddLambdaLogger(new LambdaLoggerOptions
                {
                    IncludeCategory  = true,
                    IncludeLogLevel  = true,
                    IncludeNewline   = true,
                    IncludeEventId   = true,
                    IncludeScopes    = true,
                    IncludeException = true
                });
                logging.SetMinimumLevel(LogLevel.Debug);
            }
        }
Пример #10
0
 protected override void ConfigureLogging(ILoggingBuilder logging, IExecutionEnvironment executionEnvironment) =>
 logging
 .AddLambdaLogger(Configuration, "Logging");