How to configure a Serilog sink for logging to CloudWatch

后端 未结 1 811
眼角桃花
眼角桃花 2021-01-20 03:15

I would appreciate some guidance in setting up a Serilog sink for AWS CloudWatch with .NET Core. I\'m using appsettings.json for configuration but I am unable to put the set

相关标签:
1条回答
  • 2021-01-20 03:54

    Just in case anyone has the same problem, this appsettings.json solved it:

    {
      "Logging": {
        "LogLevel": {
          "Default": "Warning"
        }
      },
      "Serilog": {
        "Using": [ "AWS.Logger.SeriLog" ]
        "Region": "eu-west-1",
        "LogGroup": "MyLogGroup",
        "LogLevel": {
          "Default": "Information",
          "System": "Information",
          "Microsoft": "Information"
        }
      },
      "AllowedHosts": "*"
    }
    
    0 讨论(0)
提交回复
热议问题