pub struct ReconfigurationHandle { /* fields omitted */ }
Allows reconfiguring the logger programmatically.
Obtain the ReconfigurationHandle
(using .start_reconfigurable()
instead of .start()
):
let mut log_handle = Logger::with_str("info")
.start_reconfigurable()
.unwrap_or_else(|e| panic!("Logger initialization failed with {}", e));
You can permanently exchange the log specification programmatically:
log_handle.parse_new_spec("warn");
However, when debugging, you often want to modify the log spec only temporarily, for
one or few method calls only; this is easier done with the following method, because
it allows switching back to the previous spec:
log_handle.parse_and_push_temp_spec("trace");
log_handle.pop_temp_spec();
Allows specifying a new LogSpecification for the current logger.
Allows specifying a new LogSpecification for the current logger.
Allows temporarily pushing a new LogSpecification for the current logger.
Allows temporarily pushing a new LogSpecification for the current logger.
Allows pushing a new LogSpecification for the current logger.
It will automatically be popped once the returned guard is dropped.
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static