You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The benefit of providing this method is that, when using command-line or environment variables, I can specify the Level in string format without worrying about the specific numerical value of the Level. This kind of setting method is commonly found in various program startup parameters, such as:
./app -level=ERROR -output=./app.log
or
LOG_LEVEL=ERROR ./app (app just get level from os.Getenv("LOG_LEVEL") and set logger level)
I think the conversion effect of ParseLevel can be similar to:
This is a proposal to add a method for converting a string to a Level. Here's an example:
The benefit of providing this method is that, when using command-line or environment variables, I can specify the Level in string format without worrying about the specific numerical value of the Level. This kind of setting method is commonly found in various program startup parameters, such as:
or
I think the conversion effect of ParseLevel can be similar to:
so the conversion effect as follows:
The text was updated successfully, but these errors were encountered: