Crate sw_logger_rs
source ·Enums§
Verbose
-> Logs all messages, regardless ofLogType
.
Debug
-> Logs messages marked asLogType::Error
,LogType::Warning
andLogType::Debug
.
Default
-> Logs messages marked asLogType::Error
andLogType::Warning
.
ErrorsOnly
-> Only logs messages marked asLogType::Error
.
Functions§
- Log a message to stdout and, optionally, a file. This function will format the message with a type-signifier and the timestamp of the moment of logging.
- Sets the level of logging. See
LogLevel
for a description of what each level means. - Sets the default path the logger uses to write to. If left as an empty
String
(or set as one), the logger won’t write to a file; only to thestdout
and thestderr
.