-
Notifications
You must be signed in to change notification settings - Fork 513
Add $env.NU_LOG_LEVEL
to Special Variables
#1976
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it fitting to add a standard library special variable to the list of special variables?
I think it is.
It's a good cross-reference to the availability of the standard library and this submodule in particular.
In this case, it's also a good cross-discoverability for --log-level
.
Or should this list of special variables not include the standard library [that has to be included manually for use]?
# => 9 | ||
``` | ||
|
||
Note that `$env.NU_LIB_DIRS` is different from `nu --log-level`, which sets the log level for Nushell commands. It does not influence the `std/log` logging used in custom commands and scripts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was think about whether there is a good, fitting qualifier for Nushell's own commands. In the end I chose not to add any qualifier, and only call the custom commands custom commands as a differentiation (like they are called in the docs).
Note that `$env.NU_LIB_DIRS` is different from `nu --log-level`, which sets the log level for Nushell commands. It does not influence the `std/log` logging used in custom commands and scripts. | |
Note that `$env.NU_LIB_DIRS` is different from `nu --log-level`, which sets the log level for native Nushell commands. It does not influence the `std/log` logging used in custom commands and scripts. |
Note that `$env.NU_LIB_DIRS` is different from `nu --log-level`, which sets the log level for Nushell commands. It does not influence the `std/log` logging used in custom commands and scripts. | |
Note that `$env.NU_LIB_DIRS` is different from `nu --log-level`, which sets the log level for (native) Nushell commands. It does not influence the `std/log` logging used in custom commands and scripts. |
@@ -118,6 +118,37 @@ A list of directories which will be searched when using the `source`, `use`, or | |||
- [Module Path](./modules/using_modules.md#module-path) | |||
- [Configuration - `$NU_LIB_DIRS`](./configuration.md#nu-lib-dirs-constant) | |||
|
|||
### `$env.NU_LOG_LEVEL` | |||
|
|||
The [standard library](/book/standard_library.md) offers logging in `std/log`. The `NU_LOG_LEVEL` environment variable is used to define the log level being used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this - with the mention and reference of standard library - sufficient to clarify the conditional nature of it? That it is not available in a fresh shell session?
No description provided.