|
@@ -146,8 +146,10 @@ impl SimpleLogger {
|
|
|
/// Simulates env_logger behavior, which enables the user to choose log
|
|
|
/// level by setting a `RUST_LOG` environment variable. This will use
|
|
|
/// the default level set by [`with_level`] if `RUST_LOG` is not set or
|
|
|
- /// can't be parsed as a standard log level.
|
|
|
- /// (if calling `with_level`, call this after that, otherwise it will have no effect)
|
|
|
+ /// can't be parsed as a standard log level.
|
|
|
+ ///
|
|
|
+ /// This must be called after [`with_level`]. If called before
|
|
|
+ /// [`with_level`], it will have no effect.
|
|
|
///
|
|
|
/// [`with_level`]: #method.with_level
|
|
|
#[must_use = "You must call init() to begin logging"]
|
|
@@ -166,6 +168,9 @@ impl SimpleLogger {
|
|
|
///
|
|
|
/// You can override the default level for specific modules and their sub-modules using [`with_module_level`]
|
|
|
///
|
|
|
+ /// This must be called before [`env`]. If called after [`env`], it will override the value loaded from the environment.
|
|
|
+ ///
|
|
|
+ /// [`env`]: #method.env
|
|
|
/// [`with_module_level`]: #method.with_module_level
|
|
|
#[must_use = "You must call init() to begin logging"]
|
|
|
pub fn with_level(mut self, level: LevelFilter) -> SimpleLogger {
|