Skip to content

Latest commit

 

History

History
 
 

AWSCloudWatch

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

AWS CloudWatch Logging with Serilog

This project showcases the ability of Serilog and log to AWS CloudWatch.

Showcased abilities

  • AWS CloudWatch Sink & Setup
  • LogStreamName generation with Environment
  • Configuration Example
  • Dependency Injection setup

Example Appsetting

{
    "Serilog:AWS": {
        "LogToCloudWatch": true,

        // Serilog Setting
        "MinimumLevel": "Information",

        // AWS specific settings
        "LogGroup": "dotnet-samples",
        "Region": "us-east-1",
        "RetentionPolicy": "SixMonths",
        "AccessKey": "<TODO>",
        "SecretKey": "<TODO>"
    }
}

Example User Secrets

{
    "Serilog:AWS": {
        "AccessKey": "YOUR-ACCESKEY-HERE",
        "SecretKey": "YOUR-SECRETKEY-HERE"
    }
}