how I can overwrite ProjectID in appsettings?
ksemele opened this issue · 2 comments
Hello!
I want to use different google projects for same service, but I misunderstand how I can make that?
I mean, on dev\stage\prod I uses different values for projectID
I thought it can be overwrites as env variable, like that:
Serilog__WriteTo__0__Args__projectID="project_2"
but it doesn't work :)
Which way is possible?
The library by default has to be configured in code. If you want to use appsettings.json
as a config file then you can follow the instructions in the readme by using the serilog-settings-configuration package.
There's no support for environment variables so if you want to use those then follow the guide for .NET Configuration: https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration and then you can read the settings and set the values in your code.
Sounds sad :(
Thanks for explaining!