Documentation
¶
Index ¶
- Constants
- func FormatPayload(payload []byte, length, cutLength, runesPerLine int) string
- func InitLog(level, formatter string, logMethod bool) error
- func IsLevelEnabled(level Level) bool
- func SetLevel(level Level)
- type Fields
- type Level
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Debugln(args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Errorln(args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) Fatalln(args ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) Infoln(args ...interface{})
- func (l *Logger) Panic(args ...interface{})
- func (l *Logger) Panicf(format string, args ...interface{})
- func (l *Logger) Panicln(args ...interface{})
- func (l *Logger) Print(args ...interface{})
- func (l *Logger) Printf(format string, args ...interface{})
- func (l *Logger) Println(args ...interface{})
- func (l *Logger) Trace(args ...interface{})
- func (l *Logger) Tracef(format string, args ...interface{})
- func (l *Logger) Traceln(args ...interface{})
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(format string, args ...interface{})
- func (l *Logger) Warnln(args ...interface{})
- func (l *Logger) WithComponent(comp string) *Logger
- func (l *Logger) WithError(err error) *Logger
- func (l *Logger) WithField(key string, value interface{}) *Logger
- func (l *Logger) WithFields(fields Fields) *Logger
Constants ¶
View Source
const ( FORMATTER_TEXT = "text" FORMATTER_JSON = "json" FORMATTER_LOGFMT = "logfmt" )
Variables ¶
This section is empty.
Functions ¶
func FormatPayload ¶
func IsLevelEnabled ¶ added in v0.8.0
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
var (
Log *Logger
)
func LogWithComponent ¶
func StandardLogger ¶
func StandardLogger() *Logger
func (*Logger) WithComponent ¶
func (*Logger) WithFields ¶
Click to show internal directories.
Click to hide internal directories.