The Session is a singleton that only lives for the duration of the program's life cycle.
It should contain the quiet and maybe verbose mode settings. This also means we can avoid the import cycle and strong dependency between Logger and Config. And thus when creating a new log instance it'll ask the session if it is in quiet mode so as not to enable the stream handler.
The
Session
is a singleton that only lives for the duration of the program's life cycle.It should contain the quiet and maybe verbose mode settings. This also means we can avoid the import cycle and strong dependency between
Logger
andConfig
. And thus when creating a new log instance it'll ask the session if it is in quiet mode so as not to enable the stream handler.