logging
v0.3.1
github.com/caos/logging
Documentation
pkg.go.dev ↗Functions
Debug
func Debug(args ...interface{})
Debugf
func Debugf(format string, args ...interface{})
Debugln
func Debugln(args ...interface{})
Error
func Error(args ...interface{})
Errorf
func Errorf(format string, args ...interface{})
Errorln
func Errorln(args ...interface{})
Fatal
func Fatal(args ...interface{})
Fatalf
func Fatalf(format string, args ...interface{})
Fatalln
func Fatalln(args ...interface{})
Info
func Info(args ...interface{})
Infof
func Infof(format string, args ...interface{})
Infoln
func Infoln(args ...interface{})
Logf
func Logf(level logrus.Level, format string, args ...interface{})
Logln
func Logln(level logrus.Level, args ...interface{})
Panic
func Panic(args ...interface{})
Panicf
func Panicf(format string, args ...interface{})
Panicln
func Panicln(args ...interface{})
SetFormatter
func SetFormatter(formatter logrus.Formatter)
SetGlobal
func SetGlobal()
SetIDKey
func SetIDKey(key string)
SetIDKey key of id in logentry
SetLevel
func SetLevel(level logrus.Level)
SetOutput
func SetOutput(out io.Writer)
Trace
func Trace(args ...interface{})
Tracef
func Tracef(format string, args ...interface{})
Traceln
func Traceln(args ...interface{})
Warn
func Warn(args ...interface{})
Warnf
func Warnf(format string, args ...interface{})
Warning
func Warning(args ...interface{})
Warningf
func Warningf(format string, args ...interface{})
Warningln
func Warningln(args ...interface{})
Warnln
func Warnln(args ...interface{})
Types
Config
type Config struct {
Level string `json:"level"`
Formatter formatter `json:"formatter"`
LocalLogger bool `json:"localLogger"`
}
Config.SetLogger
func (c *Config) SetLogger() (err error)
Config.UnmarshalJSON
func (c *Config) UnmarshalJSON(data []byte) error
Config.UnmarshalYAML
func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error
Entry
type Entry struct {
*logrus.Entry
// contains filtered or unexported fields
}
Log
func Log(id string) *Entry
Deprecated: Log creates a new entry with an id
LogWithFields
func LogWithFields(id string, fields ...interface{}) *Entry
Deprecated: LogWithFields creates a new entry with an id and the given fields
New
func New() *Entry
New instantiates a new entry
OnError
func OnError(err error) *Entry
WithFields
func WithFields(fields ...interface{}) *Entry
WithFields creates a new entry without an id and the given fields
Entry.Debug
func (e *Entry) Debug(args ...interface{})
Entry.Debugf
func (e *Entry) Debugf(format string, args ...interface{})
Entry.Debugln
func (e *Entry) Debugln(args ...interface{})
Entry.Error
func (e *Entry) Error(args ...interface{})
Entry.Errorf
func (e *Entry) Errorf(format string, args ...interface{})
Entry.Errorln
func (e *Entry) Errorln(args ...interface{})
Entry.Fatal
func (e *Entry) Fatal(args ...interface{})
Entry.Fatalf
func (e *Entry) Fatalf(format string, args ...interface{})
Entry.Fatalln
func (e *Entry) Fatalln(args ...interface{})
Entry.Info
func (e *Entry) Info(args ...interface{})
Entry.Infof
func (e *Entry) Infof(format string, args ...interface{})
Entry.Infoln
func (e *Entry) Infoln(args ...interface{})
Entry.Log
func (e *Entry) Log(level logrus.Level, args ...interface{})
Entry.Logf
func (e *Entry) Logf(level logrus.Level, format string, args ...interface{})
Entry.Logln
func (e *Entry) Logln(level logrus.Level, args ...interface{})
Entry.OnError
func (e *Entry) OnError(err error) *Entry
OnError sets the error. The log will only be printed if err is not nil
Entry.Panic
func (e *Entry) Panic(args ...interface{})
Entry.Panicf
func (e *Entry) Panicf(format string, args ...interface{})
Entry.Panicln
func (e *Entry) Panicln(args ...interface{})
Entry.SetFields
func (e *Entry) SetFields(fields ...interface{}) *Entry
SetFields sets the given fields on the entry. It panics if length of fields is odd
Entry.Trace
func (e *Entry) Trace(args ...interface{})
Entry.Tracef
func (e *Entry) Tracef(format string, args ...interface{})
Entry.Traceln
func (e *Entry) Traceln(args ...interface{})
Entry.Warn
func (e *Entry) Warn(args ...interface{})
Entry.Warnf
func (e *Entry) Warnf(format string, args ...interface{})
Entry.Warning
func (e *Entry) Warning(args ...interface{})
Entry.Warningf
func (e *Entry) Warningf(format string, args ...interface{})
Entry.Warningln
func (e *Entry) Warningln(args ...interface{})
Entry.Warnln
func (e *Entry) Warnln(args ...interface{})
Entry.WithError
func (e *Entry) WithError(err error) *Entry
Entry.WithField
func (e *Entry) WithField(key string, value interface{}) *Entry
Entry.WithFields
func (e *Entry) WithFields(fields logrus.Fields) *Entry
Entry.WithTime
func (e *Entry) WithTime(t time.Time) *Entry