|
123 | 123 | //! The letter case is not significant for the logging level names; e.g.,
|
124 | 124 | //! `debug`, `DEBUG`, and `dEbuG` all represent the same logging level.
|
125 | 125 | //!
|
| 126 | +//! There is also a pseudo logging level, `off`, which may be specified to |
| 127 | +//! disable all logging for a given module or for the entire application. As |
| 128 | +//! with the logging levels, the letter case is not significant[^fn-off]. |
| 129 | +//! |
| 130 | +//! [^fn-off]: Similar to the universe of log level names, the `off` pseudo |
| 131 | +//! log level feature is also provided by the underlying `log` crate. |
| 132 | +//! |
126 | 133 | //! As the log level for a module is optional, the module to enable logging for
|
127 | 134 | //! is also optional. **If only a level is provided, then the global log
|
128 | 135 | //! level for all modules is set to this value.**
|
129 | 136 | //!
|
130 | 137 | //! Some examples of valid values of `RUST_LOG` are:
|
131 | 138 | //!
|
132 | 139 | //! * `hello` turns on all logging for the 'hello' module
|
| 140 | +//! * `trace` turns on all logging for the application, regardless of its name |
| 141 | +//! * `TRACE` turns on all logging for the application, regardless of its name (same as previous) |
133 | 142 | //! * `info` turns on all info logging
|
134 | 143 | //! * `INFO` turns on all info logging (same as previous)
|
135 | 144 | //! * `hello=debug` turns on debug logging for 'hello'
|
136 | 145 | //! * `hello=DEBUG` turns on debug logging for 'hello' (same as previous)
|
137 | 146 | //! * `hello,std::option` turns on hello, and std's option logging
|
138 | 147 | //! * `error,hello=warn` turn on global error logging and also warn for hello
|
| 148 | +//! * `error,hello=off`` turn on global error logging, but turn off logging for hello |
| 149 | +//! * `OFF` turns off all logging for the application |
139 | 150 | //!
|
140 | 151 | //! ## Filtering results
|
141 | 152 | //!
|
|
0 commit comments