Documentation
¶
Index ¶
- Constants
- func Debug(args ...interface{})
- func DebugCtx(ctx context.Context, args ...interface{})
- func Error(args ...interface{})
- func ErrorCtx(ctx context.Context, args ...interface{})
- func Fatal(args ...interface{})
- func FatalCode(code int, args ...interface{})
- func Info(args ...interface{})
- func InfoCtx(ctx context.Context, args ...interface{})
- func InitLogging()
- func Trace(args ...interface{})
- func TraceCtx(ctx context.Context, args ...interface{})
- func Warn(args ...interface{})
- func WarnCtx(ctx context.Context, args ...interface{})
- type FatalError
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) DebugCtx(ctx context.Context, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) ErrorCtx(ctx context.Context, args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) GetCurrentLogFile() string
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) InfoCtx(ctx context.Context, args ...interface{})
- func (l *Logger) Shutdown()
- func (l *Logger) Trace(args ...interface{})
- func (l *Logger) TraceCtx(ctx context.Context, args ...interface{})
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) WarnCtx(ctx context.Context, args ...interface{})
- type RotatingLogger
Constants ¶
View Source
const ( CtxRequestID ctxKey = "request_id" CtxTraceID ctxKey = "trace_id" CtxSpanID ctxKey = "span_id" )
Variables ¶
This section is empty.
Functions ¶
func InitLogging ¶
func InitLogging()
Types ¶
type FatalError ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
---------- Public types ----------
var AppLogger *Logger
func (*Logger) Fatal ¶
func (l *Logger) Fatal(args ...interface{})
Fatal logs an error, includes a stack trace in development, and exits.
func (*Logger) GetCurrentLogFile ¶
type RotatingLogger ¶
type RotatingLogger struct {
*lumberjack.Logger
}
func NewRotatingLogger ¶
func NewRotatingLogger(logDir string) *RotatingLogger
Click to show internal directories.
Click to hide internal directories.
