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.
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 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.
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 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.
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.