Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
create Debug, Info and error loggers
Functions ¶
func InitializeLogger ¶
func InitializeLogger()
InitializeLogger initializes the logger for the microservice. It sets the logger level based on the environment variable "APP_LOG_LEVEL". If the log level is set to "debug", it creates a logger that allows debug logs. Otherwise, it creates a logger that allows error, warn and info level log events to pass. The logger is configured with a custom timestamp format and caller information. It also creates separate loggers for debug, info, and error logs. Finally, it sets the logger as the output for the standard library log package.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.