8000 GitHub - gavanlamb/serilog
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

gavanlamb/serilog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logging.Serilog

View Badge
Prerelease Expensely.Logging.Serilog package in expensely-au@Prerelease feed in Azure Artifacts
Release Expensely.Logging.Serilog package in expensely-au@Release feed in Azure Artifacts

How to Use

Configuration

Property Name Description
Serilog Serilog config please go here for details

Add Configuration

{
  "Serilog": {
    "MinimumLevel": "Warning",
    "Override": {
      "Microsoft.AspNetCore": "Warning",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Warning",
      "Microsoft.EntityFrameworkCore": "Debug"
    }
  }
}

Add Serilog to IHostBuilder

public void ConfigureServices(IServiceCollection services)
{
    IHost host = Host.CreateDefaultBuilder(args)
        .ConfigureServices(services => { services.AddHostedService<Worker>(); })
        .AddSerilog()
        .Build();
    ...
}

Add Serilog to WebApplicationBuilder

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.AddSerilog();

Development

Build, Package & Release

Locally

// Step 1: Authenticate
dotnet build --configuration release 

// Step 2: Pack
dotnet pack --configuration release 

// Step 3: Publish
dotnet nuget push "Logging.Serilog.*.nupkg" -Source "github"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

0