Versions in this module Expand all Collapse all v0 v0.0.1 Oct 31, 2019 Changes in this version + const FormatJSON + const FormatText + const OutFile + const OutStdOut + const OutSyslog + var AppName = flag.String("logger-app-name", "", "the logger's app name") + var Filename = flag.String("logger-filename", "", "the logger's filename") + var Verbose = flag.Bool("logger-verbose", false, "if true, then log level is debug") + func ContextWithField(parent context.Context, k string, v interface{}) context.Context + func ContextWithFields(parent context.Context, fs Fields) context.Context + func Debug(v ...interface{}) + func DebugC(ctx context.Context, v ...interface{}) + func DebugCf(ctx context.Context, format string, v ...interface{}) + func Debugf(format string, v ...interface{}) + func Error(v ...interface{}) + func ErrorC(ctx context.Context, v ...interface{}) + func ErrorCf(ctx context.Context, format string, v ...interface{}) + func Errorf(format string, v ...interface{}) + func Fatal(v ...interface{}) + func FatalC(ctx context.Context, v ...interface{}) + func FatalCf(ctx context.Context, format string, v ...interface{}) + func Fatalf(format string, v ...interface{}) + func FlagInit() + func Info(v ...interface{}) + func InfoC(ctx context.Context, v ...interface{}) + func InfoCf(ctx context.Context, format string, v ...interface{}) + func Infof(format string, v ...interface{}) + func SetDefaultLogger() + func SetLogger(l Logger) + func Warn(v ...interface{}) + func WarnC(ctx context.Context, v ...interface{}) + func WarnCf(ctx context.Context, format string, v ...interface{}) + func Warnf(format string, v ...interface{}) + func WithField(k, v string) + func WithFields(fs Fields) + type Configuration struct + AppName string + DisableColors bool + DisableTimestamp bool + Filename string + Format string + FullTimestamp bool + MessageKey string + Out string + TimestampFormat string + Verbose bool + func FlagConfig() Configuration + type Fields map[string]interface + type Logger interface + Debug func(v ...interface{}) + DebugC func(ctx context.Context, v ...interface{}) + DebugCf func(ctx context.Context, format string, v ...interface{}) + Debugf func(format string, v ...interface{}) + Error func(v ...interface{}) + ErrorC func(ctx context.Context, v ...interface{}) + ErrorCf func(ctx context.Context, format string, v ...interface{}) + Errorf func(format string, v ...interface{}) + Fatal func(v ...interface{}) + FatalC func(ctx context.Context, v ...interface{}) + FatalCf func(ctx context.Context, format string, v ...interface{}) + Fatalf func(format string, v ...interface{}) + Info func(v ...interface{}) + InfoC func(ctx context.Context, v ...interface{}) + InfoCf func(ctx context.Context, format string, v ...interface{}) + Infof func(format string, v ...interface{}) + Warn func(v ...interface{}) + WarnC func(ctx context.Context, v ...interface{}) + WarnCf func(ctx context.Context, format string, v ...interface{}) + Warnf func(format string, v ...interface{}) + WithField func(k string, v interface{}) + WithFields func(fs Fields) + func GetLogger() Logger + func New(c Configuration) Logger + func NopLogger() Logger + type LoggerSetter interface + SetLogger func(l Logger) + type Logrus struct + func (l *Logrus) Debug(v ...interface{}) + func (l *Logrus) DebugC(ctx context.Context, v ...interface{}) + func (l *Logrus) DebugCf(ctx context.Context, format string, v ...interface{}) + func (l *Logrus) Debugf(format string, v ...interface{}) + func (l *Logrus) Error(v ...interface{}) + func (l *Logrus) ErrorC(ctx context.Context, v ...interface{}) + func (l *Logrus) ErrorCf(ctx context.Context, format string, v ...interface{}) + func (l *Logrus) Errorf(format string, v ...interface{}) + func (l *Logrus) Fatal(v ...interface{}) + func (l *Logrus) FatalC(ctx context.Context, v ...interface{}) + func (l *Logrus) FatalCf(ctx context.Context, format string, v ...interface{}) + func (l *Logrus) Fatalf(format string, v ...interface{}) + func (l *Logrus) Info(v ...interface{}) + func (l *Logrus) InfoC(ctx context.Context, v ...interface{}) + func (l *Logrus) InfoCf(ctx context.Context, format string, v ...interface{}) + func (l *Logrus) Infof(format string, v ...interface{}) + func (l *Logrus) Warn(v ...interface{}) + func (l *Logrus) WarnC(ctx context.Context, v ...interface{}) + func (l *Logrus) WarnCf(ctx context.Context, format string, v ...interface{}) + func (l *Logrus) Warnf(format string, v ...interface{}) + func (l *Logrus) WithField(k string, v interface{}) + func (l *Logrus) WithFields(fs Fields) + func (l *Logrus) Write(b []byte) (n int, err error) + type Writer struct + func NewWriter(fs ...WriterFunc) *Writer + func (w *Writer) Close() error + func (w *Writer) Write(i []byte) (n int, err error) + type WriterFunc func(text string) + func LoggerFuncToWriterFunc(fn func(args ...interface{})) WriterFunc