setup_logger

Function setup_logger 

Source
pub fn setup_logger()
Expand description

Sets up a logger for the application

The logger level is determined by the LOGLEVEL environment variable. Supported log levels are:

  • DEBUG: Captures detailed debug information.
  • ERROR: Captures error messages.
  • WARN: Captures warnings.
  • TRACE: Captures detailed trace logs.
  • All other values default to INFO, which captures general information.

Behavior:

  • Concurrent calls to this function result in the logger being initialized only once.

ยงPanics

This function panics if setting the default subscriber fails.