Documentation ¶
Index ¶
- Constants
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func NewXLoggerConfig(c Configuration) (o xlog.Config)
- func SetDefaultLogger()
- func SetLogger(l Logger)
- func Warn(v ...interface{})
- func Warnf(format string, v ...interface{})
- func WithField(k, v string)
- func WithFields(fs Fields)
- type Configuration
- type Fields
- type Logger
- type LoggerSetter
- type Logrus
- func (l *Logrus) Clone() Logger
- func (l *Logrus) Debug(v ...interface{})
- func (l *Logrus) Debugf(format string, v ...interface{})
- func (l *Logrus) Error(v ...interface{})
- func (l *Logrus) Errorf(format string, v ...interface{})
- func (l *Logrus) Fatal(v ...interface{})
- func (l *Logrus) Fatalf(format string, v ...interface{})
- func (l *Logrus) Info(v ...interface{})
- func (l *Logrus) Infof(format string, v ...interface{})
- func (l *Logrus) Warn(v ...interface{})
- func (l *Logrus) Warnf(format string, v ...interface{})
- func (l *Logrus) WithField(k string, v interface{})
- func (l *Logrus) WithFields(fs Fields)
- type Writer
Constants ¶
View Source
const ( FormatJSON = "json" FormatText = "text" )
Formats
View Source
const ( OutFile = "file" OutStdOut = "stdout" OutSyslog = "syslog" )
Outs
Variables ¶
This section is empty.
Functions ¶
func NewXLoggerConfig ¶
func NewXLoggerConfig(c Configuration) (o xlog.Config)
NewXLoggerConfig returns a new xlog.Config
func WithFields ¶
func WithFields(fs Fields)
Types ¶
type Configuration ¶
type Configuration struct { AppName string `toml:"app_name"` DisableColors bool `toml:"disable_colors"` Filename string `toml:"filename"` FullTimestamp bool `toml:"full_timestamp"` Format string `toml:"format"` MessageKey string `toml:"message_key"` Out string `toml:"out"` TimestampFormat string `toml:"timestamp_format"` Verbose bool `toml:"verbose"` }
Configuration represents the configuration of the logger
type Logger ¶
type Logger interface { Clone() Logger Debug(v ...interface{}) Debugf(format string, v ...interface{}) Info(v ...interface{}) Infof(format string, v ...interface{}) Warn(v ...interface{}) Warnf(format string, v ...interface{}) Error(v ...interface{}) Errorf(format string, v ...interface{}) Fatal(v ...interface{}) Fatalf(format string, v ...interface{}) WithField(k string, v interface{}) WithFields(fs Fields) }
Logger represents a logger
type LoggerSetter ¶
type LoggerSetter interface {
SetLogger(l Logger)
}
LoggerSetter represents a logger setter
type Logrus ¶
type Logrus struct {
// contains filtered or unexported fields
}
Logrus represents a logrus logger
func (*Logrus) Debug ¶
func (l *Logrus) Debug(v ...interface{})
Debug implements the Logger interface
func (*Logrus) Error ¶
func (l *Logrus) Error(v ...interface{})
WithField implements the Logger interface
func (*Logrus) Fatal ¶
func (l *Logrus) Fatal(v ...interface{})
WithField implements the Logger interface
func (*Logrus) Info ¶
func (l *Logrus) Info(v ...interface{})
WithField implements the Logger interface
func (*Logrus) Warn ¶
func (l *Logrus) Warn(v ...interface{})
WithField implements the Logger interface
func (*Logrus) WithFields ¶
WithFields implements the Logger interface
Click to show internal directories.
Click to hide internal directories.