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 }
protected void ConfigureLogging(ILoggingBuilder logging) { logging.AddConfiguration(Configuration.GetSection("Logging")); logging.AddLambdaLogger(new LambdaLoggerOptions { IncludeCategory = true, IncludeLogLevel = true, IncludeNewline = true }); }
protected override void ConfigureLogging(ILoggingBuilder logging, IExecutionEnvironment executionEnvironment) { logging.AddConfiguration(Configuration.GetSection("Logging")); logging.AddLambdaLogger(new LambdaLoggerOptions { IncludeCategory = true, IncludeLogLevel = true, IncludeNewline = true }); }
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); }
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)); } }
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); } }); }
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); } }
protected override void ConfigureLogging(ILoggingBuilder logging, IExecutionEnvironment executionEnvironment) => logging .AddLambdaLogger(Configuration, "Logging");