Crate session_log

Source

Modules§

glog
prelude

Macros§

glog_critical
glog_debug
glog_error
glog_fatal
glog_info
glog_verbose
glog_warning
log_critical
log_debug
log_error
log_fatal
log_info
log_verbose
log_warning

Structs§

Config
Configuration for the logger.
DefaultFormatter
Global
The Global logger will share the same logger instance across the entire program that has the same name. This is useful when the logger is configured once and used in multiple places. The logger will be created with default configurations if it does not exist.
Location
Location type is used to represent the location where the logging is happened. It cannot be created outside of the library.
Logger
Logger is the base type that actually handle the loggings
Session
A session is a temporary logger that will print immediately but only write when dropped. All the logs during the session will be grouped together and write once. It’s useful when you want to log a series of messages such as one session of a request. The session is panic-safe, which means it will write all the logs when panic.
Source
Source type is used to store the absolute path of the source logger. A source must be started with logger, and can have any number layers of session. This type cannot be constructed outside of the library.
Time
Time type is used to represent the current time when the logging is happened. It cannot be created outside of the library.

Enums§

Context
Context type is presenting one line of logging with their corresponding information. It has three variants: Header, Footer, and Message. Header and Footer are used to represent the start and end of the logging session, while Message is used to represent the actual logging message. This type cannot be created outside of the library.
Level
Level enum is representing the level of message & which level the logger accepts. There are 7 that are available: Verbose, Debug, Info, Warning, Critical, Error, and Fatal.

Traits§

Formatter
Loggable
Loggable trait is used to define the common behavior for the type that can be used as a logger.
Output
Output trait is used to define a common interface for all types that can both be written to a file and printed to the console. This is the basic traits for each components of the log.