Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ProductionLogLevel is the level for the production log. ProductionLogLevel LogLevel = "PRODUCTION" // DevelopmentLogLevel is the level for development log. DevelopmentLogLevel LogLevel = "DEVELOPMENT" // EnvLoggerLevel is the environment variable name for log level. EnvLoggerLevel = "LOGGER_LEVEL" // LogCtxIDKey holds the TraceId for log. LogCtxIDKey = "TraceId" )
Variables ¶
This section is empty.
Functions ¶
func GetLogger ¶
func GetLogger(ctx context.Context) *zap.SugaredLogger
GetLogger returns SugaredLogger associated with given context.
func GetNewContextWithLogger ¶
func GetNewContextWithLogger(key string) (context.Context, *zap.SugaredLogger)
GetNewContextWithLogger creates a new context with context UUID and logger set func returns both context and logger to the caller.
Types ¶
Click to show internal directories.
Click to hide internal directories.