Documentation
¶
Index ¶
- Variables
- func AddCtxFields(fields []string)
- func AddHook(hook log.Hook)
- func Debug(args ...interface{})
- func DebugFn(fn log.LogFunction)
- func DebugFnX(ctx context.Context, fn log.LogFunction)
- func DebugX(ctx context.Context, args ...interface{})
- func Debugf(format string, args ...interface{})
- func DebugfX(ctx context.Context, format string, args ...interface{})
- func Debugln(args ...interface{})
- func DebuglnX(ctx context.Context, args ...interface{})
- func Error(args ...interface{})
- func ErrorFn(fn log.LogFunction)
- func ErrorFnX(ctx context.Context, fn log.LogFunction)
- func ErrorX(ctx context.Context, args ...interface{})
- func Errorf(format string, args ...interface{})
- func ErrorfX(ctx context.Context, format string, args ...interface{})
- func Errorln(args ...interface{})
- func ErrorlnX(ctx context.Context, args ...interface{})
- func Fatal(args ...interface{})
- func FatalFn(fn log.LogFunction)
- func FatalFnX(ctx context.Context, fn log.LogFunction)
- func FatalX(ctx context.Context, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func FatalfX(ctx context.Context, format string, args ...interface{})
- func Fatalln(args ...interface{})
- func FatallnX(ctx context.Context, args ...interface{})
- func Info(args ...interface{})
- func InfoFn(fn log.LogFunction)
- func InfoFnX(ctx context.Context, fn log.LogFunction)
- func InfoX(ctx context.Context, args ...interface{})
- func Infof(format string, args ...interface{})
- func InfofX(ctx context.Context, format string, args ...interface{})
- func Infoln(args ...interface{})
- func InfolnX(ctx context.Context, args ...interface{})
- func InitLogger()
- func Panic(args ...interface{})
- func PanicFn(fn log.LogFunction)
- func PanicFnX(ctx context.Context, fn log.LogFunction)
- func PanicX(ctx context.Context, args ...interface{})
- func Panicf(format string, args ...interface{})
- func PanicfX(ctx context.Context, format string, args ...interface{})
- func Panicln(args ...interface{})
- func PaniclnX(ctx context.Context, args ...interface{})
- func Print(args ...interface{})
- func PrintFn(fn log.LogFunction)
- func PrintFnX(ctx context.Context, fn log.LogFunction)
- func PrintX(ctx context.Context, args ...interface{})
- func Printf(format string, args ...interface{})
- func PrintfX(ctx context.Context, format string, args ...interface{})
- func Println(args ...interface{})
- func PrintlnX(ctx context.Context, args ...interface{})
- func Trace(args ...interface{})
- func TraceFn(fn log.LogFunction)
- func TraceFnX(ctx context.Context, fn log.LogFunction)
- func TraceX(ctx context.Context, args ...interface{})
- func Tracef(format string, args ...interface{})
- func TracefX(ctx context.Context, format string, args ...interface{})
- func Traceln(args ...interface{})
- func TracelnX(ctx context.Context, args ...interface{})
- func Warn(args ...interface{})
- func WarnFn(fn log.LogFunction)
- func WarnFnX(ctx context.Context, fn log.LogFunction)
- func WarnX(ctx context.Context, args ...interface{})
- func Warnf(format string, args ...interface{})
- func WarnfX(ctx context.Context, format string, args ...interface{})
- func Warning(args ...interface{})
- func WarningFn(fn log.LogFunction)
- func WarningFnX(ctx context.Context, fn log.LogFunction)
- func WarningX(ctx context.Context, args ...interface{})
- func Warningf(format string, args ...interface{})
- func WarningfX(ctx context.Context, format string, args ...interface{})
- func Warningln(args ...interface{})
- func WarninglnX(ctx context.Context, args ...interface{})
- func Warnln(args ...interface{})
- func WarnlnX(ctx context.Context, args ...interface{})
- func WithContext(ctx context.Context) *log.Entry
- func WithError(err error) *log.Entry
- func WithField(key string, value interface{}) *log.Entry
- func WithFields(fields log.Fields) *log.Entry
- func WithTime(t time.Time) *log.Entry
- type BaseOptions
- type CustomOptions
Constants ¶
This section is empty.
Variables ¶
var ( DefaultCustomOptions = &CustomOptions{ CtxFiles: []string{}, InternalFilesPrefix: "x_", } )
Functions ¶
func AddCtxFields ¶
func AddCtxFields(fields []string)
func Debug ¶
func Debug(args ...interface{})
Debug logs a message at level Debug on the standard logger.
func DebugFn ¶
func DebugFn(fn log.LogFunction)
DebugFn logs a message from a func at level Debug on the standard logger.
func DebugFnX ¶
func DebugFnX(ctx context.Context, fn log.LogFunction)
DebugFnX logs a message from a func at level Debug on the standard logger.
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf logs a message at level Debug on the standard logger.
func Debugln ¶
func Debugln(args ...interface{})
Debugln logs a message at level Debug on the standard logger.
func Error ¶
func Error(args ...interface{})
Error logs a message at level Error on the standard logger.
func ErrorFn ¶
func ErrorFn(fn log.LogFunction)
ErrorFn logs a message from a func at level Error on the standard logger.
func ErrorFnX ¶
func ErrorFnX(ctx context.Context, fn log.LogFunction)
ErrorFnX logs a message from a func at level Error on the standard logger.
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf logs a message at level Error on the standard logger.
func Errorln ¶
func Errorln(args ...interface{})
Errorln logs a message at level Error on the standard logger.
func Fatal ¶
func Fatal(args ...interface{})
Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
func FatalFn ¶
func FatalFn(fn log.LogFunction)
FatalFn logs a message from a func at level Fatal on the standard logger then the process will exit with status set to 1.
func FatalFnX ¶
func FatalFnX(ctx context.Context, fn log.LogFunction)
FatalFnX logs a message from a func at level Fatal on the standard logger then the process will exit with status set to 1.
func FatalX ¶
FatalX logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
func FatalfX ¶
FatalfX logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
func Fatalln ¶
func Fatalln(args ...interface{})
Fatalln logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
func FatallnX ¶
FatallnX logs a message at level Fatal on the standard logger then the process will exit with status set to 1.
func Info ¶
func Info(args ...interface{})
Info logs a message at level Info on the standard logger.
func InfoFn ¶
func InfoFn(fn log.LogFunction)
InfoFn logs a message from a func at level Info on the standard logger.
func InfoFnX ¶
func InfoFnX(ctx context.Context, fn log.LogFunction)
InfoFnX logs a message from a func at level Info on the standard logger.
func Infof ¶
func Infof(format string, args ...interface{})
Infof logs a message at level Info on the standard logger.
func Infoln ¶
func Infoln(args ...interface{})
Infoln logs a message at level Info on the standard logger.
func InitLogger ¶
func InitLogger()
func Panic ¶
func Panic(args ...interface{})
Panic logs a message at level Panic on the standard logger.
func PanicFn ¶
func PanicFn(fn log.LogFunction)
PanicFn logs a message from a func at level Panic on the standard logger.
func PanicFnX ¶
func PanicFnX(ctx context.Context, fn log.LogFunction)
PanicFnX logs a message from a func at level Panic on the standard logger.
func Panicf ¶
func Panicf(format string, args ...interface{})
Panicf logs a message at level Panic on the standard logger.
func Panicln ¶
func Panicln(args ...interface{})
Panicln logs a message at level Panic on the standard logger.
func Print ¶
func Print(args ...interface{})
Print logs a message at level Info on the standard logger.
func PrintFn ¶
func PrintFn(fn log.LogFunction)
PrintFn logs a message from a func at level Info on the standard logger.
func PrintFnX ¶
func PrintFnX(ctx context.Context, fn log.LogFunction)
PrintFnX logs a message from a func at level Info on the standard logger.
func Printf ¶
func Printf(format string, args ...interface{})
Printf logs a message at level Info on the standard logger.
func Println ¶
func Println(args ...interface{})
Println logs a message at level Info on the standard logger.
func Trace ¶
func Trace(args ...interface{})
Trace logs a message at level Trace on the standard logger.
func TraceFn ¶
func TraceFn(fn log.LogFunction)
TraceFn logs a message from a func at level Trace on the standard logger.
func TraceFnX ¶
func TraceFnX(ctx context.Context, fn log.LogFunction)
TraceFnX logs a message from a func at level Trace on the standard logger.
func Tracef ¶
func Tracef(format string, args ...interface{})
Tracef logs a message at level Trace on the standard logger.
func Traceln ¶
func Traceln(args ...interface{})
Traceln logs a message at level Trace on the standard logger.
func Warn ¶
func Warn(args ...interface{})
Warn logs a message at level Warn on the standard logger.
func WarnFn ¶
func WarnFn(fn log.LogFunction)
WarnFn logs a message from a func at level Warn on the standard logger.
func WarnFnX ¶
func WarnFnX(ctx context.Context, fn log.LogFunction)
WarnFnX logs a message from a func at level Warn on the standard logger.
func Warnf ¶
func Warnf(format string, args ...interface{})
Warnf logs a message at level Warn on the standard logger.
func Warning ¶
func Warning(args ...interface{})
Warning logs a message at level Warn on the standard logger.
func WarningFn ¶
func WarningFn(fn log.LogFunction)
WarningFn logs a message from a func at level Warn on the standard logger.
func WarningFnX ¶
func WarningFnX(ctx context.Context, fn log.LogFunction)
WarningFnX logs a message from a func at level Warn on the standard logger.
func Warningf ¶
func Warningf(format string, args ...interface{})
Warningf logs a message at level Warn on the standard logger.
func Warningln ¶
func Warningln(args ...interface{})
Warningln logs a message at level Warn on the standard logger.
func WarninglnX ¶
WarninglnX logs a message at level Warn on the standard logger.
func Warnln ¶
func Warnln(args ...interface{})
Warnln logs a message at level Warn on the standard logger.
func WithContext ¶
WithContext creates an entry from the standard logger and adds a context to it.
func WithError ¶
WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
func WithField ¶
WithField creates an entry from the standard logger and adds a field to it. If you want multiple fields, use `WithFields`.
Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal or Panic on the Entry it returns.
func WithFields ¶
WithFields creates an entry from the standard logger and adds multiple fields to it. This is simply a helper for `WithField`, invoking it once for each field.
Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal or Panic on the Entry it returns.