serilog / serilog-settings-configuration

A Serilog configuration provider that reads from Microsoft.Extensions.Configuration
Apache License 2.0
444 stars 129 forks source link

It is possible to change the serilog minimum log level by Linux custom service? #423

Open malavvvakharia opened 2 months ago

malavvvakharia commented 2 months ago

Hello,

I am facing the issue of change the minimum level of serilog so right now I am trying to set the level by Environment=Serilog__MinimumLevel=Information but it is not working.

The service file looks like below:

[Unit] Description=ABC

[Service] WorkingDirectory=/var/www/html/abc ExecStart=/var/www/html/backend/ABC Restart=always RestartSec=10 KillSignal=SIGINT Environment=ASPNETCORE_ENVIRONMENT=Production Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false Environment=Serilog__MinimumLevel=Information

[Install] WantedBy=multi-user.target