Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use it with .net core appsettings.json file #22

Closed
rushi216 opened this issue Aug 4, 2017 · 2 comments
Closed

How to use it with .net core appsettings.json file #22

rushi216 opened this issue Aug 4, 2017 · 2 comments

Comments

@rushi216
Copy link

rushi216 commented Aug 4, 2017

How can we use it with .net core appsettings.json file (https://github.com/serilog/serilog-settings-configuration)?

@Ricky-G
Copy link

Ricky-G commented Aug 6, 2017

you would configure it like it this (the below example is using a rolling log file)

"WriteTo": [{
      "Name": "Async",
      "Args": {
        "configure": [{
          "Name": "RollingFile",
          "Args": {
            "pathFormat": "Logs/log-{Date}.txt",
            "formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact",
            "fileSizeLimitBytes": 5000000,
            "retainedFileCountLimit": null
          }
        }]
      }
    }],

@frg
Copy link

frg commented Sep 22, 2017

Thanks @Ricky-G! Looks like this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants