Created
May 14, 2021 20:45
-
-
Save manoj-choudhari-git/bc119df77e865998cd266d8dfef059d5 to your computer and use it in GitHub Desktop.
.NET Applications - Logging - Set Log Levels via Command Line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This command is to set the environment variable temporarily | |
## Sets variable for only current window | |
## Hence, not applicable if app is run from Visual Studio | |
set Logging__LogLevel__Microsoft=Information | |
dotnet run | |
## Setx to persist the setting in environment variables | |
## The swtich /M is to set the variable at system level | |
## Without this switch, variable is set at user level | |
## If SETX is used, apps run from Visual Studio would also use this value. | |
setx Logging__LogLevel__Microsoft=Information /M | |
dotnet run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment