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

Adding settings to config file in .NET Core #72

Closed
im1dermike opened this issue Mar 24, 2017 · 0 comments
Closed

Adding settings to config file in .NET Core #72

im1dermike opened this issue Mar 24, 2017 · 0 comments

Comments

@im1dermike
Copy link

I have SeriLog working in my .NET Core web app. I've configured it in my Startup class like this:

Log.Logger = new LoggerConfiguration()
    .MinimumLevel.Debug()
    .WriteTo.RollingFile("C:/LogFiles/log-{Date}.txt")
    .CreateLogger();

I'd like to pull out configuration properties like the min log level and rolling file path to a file. In .NET Core, it would seem either the appsettings.json file or web.config file would be appropriate. In my project, I have these environment-specific versions for these files.

How can I move configuration properties to a config file in .NET Core?

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

1 participant