Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Debugln(v ...interface{})
- func Display(v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Errorln(v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Fatalln(v ...interface{})
- func Hook(hook logrus.Hook)
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Infoln(v ...interface{})
- func Instance() *logrus.Logger
- func IsDebug() bool
- func IsError() bool
- func IsFatal() bool
- func IsInfo() bool
- func IsPanic() bool
- func IsTrace() bool
- func IsWarn() bool
- func Panic(v ...interface{})
- func Panicf(format string, v ...interface{})
- func Panicln(v ...interface{})
- func Print(v ...interface{})
- func Printf(format string, v ...interface{})
- func Println(v ...interface{})
- func SetFormat(v string)
- func SetLevel(v string)
- func SetOutput(v string)
- func Warn(v ...interface{})
- func Warnf(format string, v ...interface{})
- func Warnln(v ...interface{})
- func WithField(key string, value interface{}) *logrus.Entry
- func WithFields(fields map[string]interface{}) *logrus.Entry
- func WithPrefix(value interface{}) *logrus.Entry
- type DefaultHook
- type JSONFormatter
- type Logger
- type StackdriverLogger
- type TextFormatter
Constants ¶
const ( PanicLevel = logrus.PanicLevel FatalLevel = logrus.FatalLevel ErrorLevel = logrus.ErrorLevel WarnLevel = logrus.WarnLevel InfoLevel = logrus.InfoLevel DebugLevel = logrus.DebugLevel TraceLevel = logrus.TraceLevel )
Variables ¶
var ( PanicLevels = []logrus.Level{ PanicLevel, } FatalLevels = []logrus.Level{ PanicLevel, FatalLevel, } ErrorLevels = []logrus.Level{ PanicLevel, FatalLevel, ErrorLevel, } WarnLevels = []logrus.Level{ PanicLevel, FatalLevel, ErrorLevel, WarnLevel, } InfoLevels = []logrus.Level{ PanicLevel, FatalLevel, ErrorLevel, WarnLevel, InfoLevel, } DebugLevels = []logrus.Level{ PanicLevel, FatalLevel, ErrorLevel, WarnLevel, InfoLevel, DebugLevel, } TraceLevels = []logrus.Level{ PanicLevel, FatalLevel, ErrorLevel, WarnLevel, InfoLevel, DebugLevel, TraceLevel, } )
Functions ¶
func Debug ¶
func Debug(v ...interface{})
Debug logs a message at level Debug on the standard logger.
func Debugf ¶
func Debugf(format string, v ...interface{})
Debugf logs a message at level Debug on the standard logger.
func Debugln ¶
func Debugln(v ...interface{})
Debugln logs a message at level Debug on the standard logger.
func Error ¶
func Error(v ...interface{})
Error loggs a message at level Error on the standard logger.
func Errorf ¶
func Errorf(format string, v ...interface{})
Errorf loggs a message at level Error on the standard logger.
func Errorln ¶
func Errorln(v ...interface{})
Errorln loggs a message at level Error on the standard logger.
func Fatal ¶
func Fatal(v ...interface{})
Fatal loggs a message at level Fatal on the standard logger.
func Fatalf ¶
func Fatalf(format string, v ...interface{})
Fatalf loggs a message at level Fatal on the standard logger.
func Fatalln ¶
func Fatalln(v ...interface{})
Fatalln loggs a message at level Fatal on the standard logger.
func Infof ¶
func Infof(format string, v ...interface{})
Infof loggs a message at level Info on the standard logger.
func Infoln ¶
func Infoln(v ...interface{})
Infoln loggs a message at level Info on the standard logger.
func Panic ¶
func Panic(v ...interface{})
Panic loggs a message at level Panic on the standard logger.
func Panicf ¶
func Panicf(format string, v ...interface{})
Panicf loggs a message at level Panic on the standard logger.
func Panicln ¶
func Panicln(v ...interface{})
Panicln loggs a message at level Panic on the standard logger.
func Print ¶
func Print(v ...interface{})
Print loggs a message at level Print on the standard logger.
func Printf ¶
func Printf(format string, v ...interface{})
Printf loggs a message at level Print on the standard logger.
func Println ¶
func Println(v ...interface{})
Println loggs a message at level Print on the standard logger.
func Warnf ¶
func Warnf(format string, v ...interface{})
Warnf loggs a message at level Warn on the standard logger.
func Warnln ¶
func Warnln(v ...interface{})
Warnln loggs a message at level Warn on the standard logger.
func WithFields ¶
WithFields prepares a log entry with multiple data fields.
func WithPrefix ¶
WithPrefix prepares a log entry with a prefix.
Types ¶
type DefaultHook ¶
type DefaultHook struct {
// contains filtered or unexported fields
}
func (*DefaultHook) Levels ¶
func (h *DefaultHook) Levels() []logrus.Level
func (*DefaultHook) SetFormat ¶
func (h *DefaultHook) SetFormat(v string)
SetFormat sets the logging format of the logger instance.
func (*DefaultHook) SetLevel ¶
func (h *DefaultHook) SetLevel(v string)
SetLevel sets the logging level of the logger instance.
func (*DefaultHook) SetOutput ¶
func (h *DefaultHook) SetOutput(v string)
SetOutput sets the logging output of the logger instance.
type JSONFormatter ¶
type StackdriverLogger ¶
type StackdriverLogger struct {
// contains filtered or unexported fields
}
func NewStackDriver ¶
func NewStackDriver() *StackdriverLogger
func (*StackdriverLogger) Levels ¶
func (h *StackdriverLogger) Levels() []logrus.Level