Documentation
¶
Index ¶
- type JSONLogger
- type Logger
- func (logger *Logger) Debug(args ...interface{})
- func (logger *Logger) Debugf(format string, args ...interface{})
- func (logger *Logger) Error(args ...interface{})
- func (logger *Logger) Errorf(format string, args ...interface{})
- func (logger *Logger) Fatal(args ...interface{})
- func (logger *Logger) Fatalf(format string, args ...interface{})
- func (logger *Logger) Info(args ...interface{})
- func (logger *Logger) Infof(format string, args ...interface{})
- func (logger *Logger) Panic(args ...interface{})
- func (logger *Logger) Panicf(format string, args ...interface{})
- func (logger *Logger) Print(args ...interface{})
- func (logger *Logger) Printf(format string, args ...interface{})
- func (logger *Logger) Warn(args ...interface{})
- func (logger *Logger) Warnf(format string, args ...interface{})
- func (logger *Logger) WithFields(fields map[string]interface{}) *log.Entry
- type NullWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONLogger ¶
type JSONLogger struct {
// contains filtered or unexported fields
}
JSONLogger is a logger JSON formatter wrap
func (*JSONLogger) WithFields ¶
func (logger *JSONLogger) WithFields(fields map[string]interface{}) *log.Entry
WithFields returns a log entry
type Logger ¶
type Logger struct { Active bool // contains filtered or unexported fields }
Logger is a abstraction base on log.Logger
func NewLogger ¶
func NewLogger(serviceName, serviceVersion string, serviceENV config.ServiceENV, network, addr string, priority syslog.Priority) (*Logger, error)
NewLogger returns a Logger
func (*Logger) Debug ¶
func (logger *Logger) Debug(args ...interface{})
Debug will invoke logrus.Debug
func (*Logger) Error ¶
func (logger *Logger) Error(args ...interface{})
Error will invoke logrus.Error
func (*Logger) Fatal ¶
func (logger *Logger) Fatal(args ...interface{})
Fatal will invoke logrus.Fatal
func (*Logger) Panic ¶
func (logger *Logger) Panic(args ...interface{})
Panic will invoke logrus.Panic
func (*Logger) Print ¶
func (logger *Logger) Print(args ...interface{})
Print will invoke logrus.Print
Click to show internal directories.
Click to hide internal directories.