Documentation ¶
Index ¶
- Constants
- func Caller(skip int) (string, int)
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Debugln(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 Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Infoln(v ...interface{})
- func SetLevel(level Level)
- func SetOutput(writer io.Writer)
- func Warn(v ...interface{})
- func Warnf(format string, v ...interface{})
- func Warnln(v ...interface{})
- type Level
- type LogBackend
- type LogEntry
- type Logger
- func (s *Logger) AddBackend(backend LogBackend)
- func (s *Logger) Debug(v ...interface{})
- func (s *Logger) Debugf(format string, v ...interface{})
- func (s *Logger) Debugln(v ...interface{})
- func (s *Logger) Error(v ...interface{})
- func (s *Logger) Errorf(format string, v ...interface{})
- func (s *Logger) Errorln(v ...interface{})
- func (s *Logger) Fatal(v ...interface{})
- func (s *Logger) Fatalf(format string, v ...interface{})
- func (s *Logger) Fatalln(v ...interface{})
- func (s *Logger) Info(v ...interface{})
- func (s *Logger) Infof(format string, v ...interface{})
- func (s *Logger) Infoln(v ...interface{})
- func (s *Logger) Warn(v ...interface{})
- func (s *Logger) Warnf(format string, v ...interface{})
- func (s *Logger) Warnln(v ...interface{})
- func (s *Logger) Write(level Level, str string) error
- type SentryBackend
- type SlackBackend
- type WriterBackend
Constants ¶
View Source
const ( FatalLevel = Level(iota) ErrorLevel WarnLevel InfoLevel DebugLevel )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogBackend ¶
type LogEntry ¶
type LogEntry struct { Caller struct { LineNumber int File string } Time time.Time Level Level Message string }
func NewLogEntry ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(backends ...LogBackend) *Logger
func (*Logger) AddBackend ¶
func (s *Logger) AddBackend(backend LogBackend)
type SentryBackend ¶
type SentryBackend struct {
// contains filtered or unexported fields
}
func NewSentryBackend ¶
func NewSentryBackend(dsn string, componentName, componentVersion string) (*SentryBackend, error)
func (*SentryBackend) GetLevel ¶
func (s *SentryBackend) GetLevel() Level
func (*SentryBackend) Write ¶
func (s *SentryBackend) Write(entry LogEntry) error
type SlackBackend ¶
type SlackBackend struct {
// contains filtered or unexported fields
}
func NewSlackBackend ¶
func (*SlackBackend) GetLevel ¶
func (s *SlackBackend) GetLevel() Level
func (*SlackBackend) Write ¶
func (s *SlackBackend) Write(entry LogEntry) error
type WriterBackend ¶
type WriterBackend struct {
// contains filtered or unexported fields
}
func NewWriterBackend ¶
func (*WriterBackend) GetLevel ¶
func (s *WriterBackend) GetLevel() Level
func (*WriterBackend) Write ¶
func (s *WriterBackend) Write(entry LogEntry) error
Click to show internal directories.
Click to hide internal directories.