Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug func(args ...interface{})
Debug logs a message at level Debug on the standard logger.
View Source
var DebugCtx func(ctx context.Context, args ...interface{})
View Source
var DebugCtxf func(ctx context.Context, format string, args ...interface{})
View Source
var Debugf func(format string, args ...interface{})
View Source
var Error func(args ...interface{})
Error logs a message at level Error on the standard logger.
View Source
var ErrorCtx func(ctx context.Context, args ...interface{})
View Source
var ErrorCtxf func(ctx context.Context, format string, args ...interface{})
View Source
var Errorf func(format string, args ...interface{})
View Source
var Fatal func(args ...interface{})
Fatal logs a message at level Fatal on the standard logger.
View Source
var FatalCtx func(ctx context.Context, args ...interface{})
View Source
var FatalCtxf func(ctx context.Context, format string, args ...interface{})
View Source
var Fatalf func(format string, args ...interface{})
View Source
var Info func(args ...interface{})
Info logs a message at level Info on the standard logger.
View Source
var InfoCtx func(ctx context.Context, args ...interface{})
View Source
var InfoCtxf func(ctx context.Context, format string, args ...interface{})
View Source
var Infof func(format string, args ...interface{})
View Source
var Panic func(args ...interface{})
Panic logs a message at level Panic on the standard logger.
View Source
var PanicCtx func(ctx context.Context, args ...interface{})
View Source
var PanicCtxf func(ctx context.Context, format string, args ...interface{})
View Source
var Panicf func(format string, args ...interface{})
View Source
var Warn func(args ...interface{})
Warn logs a message at level Warn on the standard logger.
View Source
var WarnCtx func(ctx context.Context, args ...interface{})
View Source
var WarnCtxf func(ctx context.Context, format string, args ...interface{})
View Source
var Warnf func(format string, args ...interface{})
Functions ¶
func SetCtxSeparator ¶
func SetCtxSeparator(separator string)
func SetLoggerType ¶
func SetLoggerType(typ LoggerType)
Types ¶
type AbsLog ¶
type AbsLog interface { Debug(args ...interface{}) Debugf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Warn(args ...interface{}) Warnf(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) Panic(args ...interface{}) Panicf(format string, args ...interface{}) }
type AbsLogBuilder ¶
type AbsLogBuilder interface { LogLevel(level LogLevel) AbsLogBuilder LoggerGen(generator LoggerGen) AbsLogBuilder LoggerType(loggerType LoggerType) AbsLogBuilder EncoderType(encoderType EncoderType) AbsLogBuilder BuildAndSetAsGlobal() AbsLog Build() AbsLog }
AbsLogBuilder is the interface that wraps the Builder methods to create a new AbsLog.
func GetAbsLogBuilder ¶
func GetAbsLogBuilder() AbsLogBuilder
GetAbsLogBuilder returns a new AbsLog builder.
type EncoderType ¶
type EncoderType int8
const ( ConsoleEncoder EncoderType = iota + 1 JSONEncoder )
type LoggerGen ¶
type LoggerGen func(logLevel LogLevel, encoder EncoderType) AbsLog
Click to show internal directories.
Click to hide internal directories.