Documentation ¶
Index ¶
- Constants
- func Debug(msg string, fields ...Field)
- func Debugc(ctx context.Context, msg string, fields ...Field)
- func Error(msg string, err error, fields ...Field)
- func Errorc(ctx context.Context, msg string, err error, fields ...Field)
- func Fatal(msg string, err error, fields ...Field)
- func Fatalc(ctx context.Context, msg string, err error, fields ...Field)
- func Info(msg string, fields ...Field)
- func Infoc(ctx context.Context, msg string, fields ...Field)
- func Infof(format string, v ...any)
- func InitializeRlog()
- func LogMiddleware() gin.HandlerFunc
- func Warn(msg string, fields ...Field)
- func Warnc(ctx context.Context, msg string, fields ...Field)
- type CorrelationIdType
- type Field
- type Logger
Constants ¶
const ( RequestIdKey CorrelationIdType = iota SessionIdKey LOG_LEVEL = "LOG_LEVEL" LOG_OUTPUT = "LOG_OUTPUT" LOG_OUTPUT_ERROR = "LOG_OUTPUT_ERROR" LOG_DEVELOP = "LOG_DEVELOP" )
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
Debug logs a message at InfoLevel. The message includes any fields passed at the log site.
func Debugc ¶
Debugc logs a message at DebugLevel with context. The message includes any fields passed at the log site and any tracing fields in the attached context, if the context contains known fields these are also added
func Error ¶
Error logs a message at InfoLevel. The message includes any fields passed at the log site.
func Errorc ¶
Errorc logs a message at ErrorLevel with context. The message includes any fields passed at the log site and any tracing fields in the attached context, if the context contains known fields these are also added
func Fatal ¶
Fatal logs a message at InfoLevel. The message includes any fields passed at the log site. The logger then calls os.Exit(1), even if logging at FatalLevel is disabled.
func Fatalc ¶
Fatalc logs a message at FatalLevel with context. The message includes any fields passed at the log site and any tracing fields in the attached context, if the context contains known fields these are also added The logger then calls os.Exit(1), even if logging at FatalLevel is disabled.
func Info ¶
Info logs a message at InfoLevel. The message includes any fields passed at the log site.
func Infoc ¶
Infoc logs a message at InfoLevel with context. The message includes any fields passed at the log site and any tracing fields in the attached context, if the context contains known fields these are also added
func InitializeRlog ¶
func InitializeRlog()
func LogMiddleware ¶
func LogMiddleware() gin.HandlerFunc
Types ¶
type CorrelationIdType ¶
type CorrelationIdType int