Module r3bl_rs_utils_core::utils::file_logging
source · Expand description
§How to log things, and simply use the logging facilities
The simplest way to use this crate is to look at the try_to_set_log_level function as the main entry point. By default, logging is disabled even if you call all the functions in this module: log_debug, log_info, log_trace, etc.
Note that, although read and write methods require a &mut File
, because of the
interfaces for Read
and Write
, the holder of a &File
can still modify the file,
either through methods that take &File
or by retrieving the underlying OS object and
modifying the file that way. Additionally, many operating systems allow concurrent
modification of files by different processes. Avoid assuming that holding a &File
means that the file will not change.
§How to change how logging is implemented under the hood
Under the hood the simplelog
crate is forked
and modified for use in the
r3bl_simple_logger crate. For people
who want to work on changing the underlying behavior of the logging engine itself it
is best to look in that crate and make changes there.
Statics§
Functions§
- Please take a look at try_to_set_log_level to enable or disable logging.
- Please take a look at try_to_set_log_level to enable or disable logging.
- Please take a look at try_to_set_log_level to enable or disable logging.
- Please take a look at try_to_set_log_level to enable or disable logging.
- Please take a look at try_to_set_log_level to enable or disable logging.
- Please take a look at try_to_set_log_level to enable or disable logging.
- If you don’t call this function w/ a value other than LevelFilter::Off, then logging is DISABLED by default. It won’t matter if you call any of the other logging functions in this module.