logger

package
v1.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DebugLogger kitlog.Logger
	InfoLogger  kitlog.Logger
	ErrorLogger kitlog.Logger
)

create Debug, Info and error loggers

Functions

func Debug

func Debug(msg ...string)

Helper functions

func Error

func Error(msg ...string)

func Info

func Info(msg ...string)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL