Skip to content

Serilog configuration with .json file (framework 4.5+)

Notifications You must be signed in to change notification settings

morphey83/Serilog.Settings.Json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serilog.Settings.Json

Serilog configuration with .json file (framework 4.5+)

Installing

Install-Package Serilog.Settings.Json

Usage

new LoggerConfiguration()
	.ReadFrom.Json("SerilogSettings.json")
	.CreateLogger();

SerilogSettings.json

{
  "Serilog": {
    "Using": [
      "Serilog.Sinks.Console",
      "Serilog.Sinks.File"
    ],
    "MinimumLevel": "Debug",
    "WriteTo": [
      { "Name": "Console" },
      { "Name": "File", "Args": { "path": "log.txt" }  }
    ],
    
    //Enrich : []
    //Filter: []
    //AuditTo: []
    //Destructure: []
    //Properties : {}    
  }
}

About

Serilog configuration with .json file (framework 4.5+)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages