Documentation ¶
Index ¶
- func GetOSEnvMap() map[string]string
- type AbstractLogger
- func (s *AbstractLogger) Close()
- func (s *AbstractLogger) Debug(args ...interface{})
- func (s *AbstractLogger) Debugf(format string, args ...interface{})
- func (s *AbstractLogger) Error(args ...interface{})
- func (s *AbstractLogger) Errorf(format string, args ...interface{})
- func (s *AbstractLogger) Fatal(args ...interface{})
- func (s *AbstractLogger) Fatalf(format string, args ...interface{})
- func (s *AbstractLogger) Info(args ...interface{})
- func (s *AbstractLogger) Infof(format string, args ...interface{})
- func (s *AbstractLogger) Logf(level Level, format string, args ...interface{})
- func (s *AbstractLogger) Warning(args ...interface{})
- func (s *AbstractLogger) Warningf(format string, args ...interface{})
- func (s *AbstractLogger) WithError(err error) Logger
- func (s *AbstractLogger) WithField(key string, value interface{}) Logger
- func (s *AbstractLogger) WithRequest(req *http.Request) Logger
- type ArrayLogger
- func (s *ArrayLogger) Clone() *ArrayLogger
- func (s *ArrayLogger) Log(level Level, args ...interface{})
- func (s *ArrayLogger) Storage() []string
- func (s *ArrayLogger) WithError(err error) Logger
- func (s *ArrayLogger) WithFields(fields Fields) Logger
- func (s *ArrayLogger) WithRequest(req *http.Request) Logger
- type Clonable
- type Creator
- func (c Creator) Create() (Logger, error)
- func (c Creator) GetEnv(key string, def string) string
- func (c Creator) NewArrayLogger() (Logger, error)
- func (c Creator) NewLogChannel(channel string) (Logger, error)
- func (c Creator) NewNullLogger() Logger
- func (c Creator) NewRollbar() (*rollbar.Client, error)
- func (c Creator) NewRollbarLogger(r *rollbar.Client) (Logger, error)
- func (c Creator) NewSentryHub() (*sentry.Hub, error)
- func (c Creator) NewSentryLogger(s *sentry.Hub) (Logger, error)
- func (c Creator) NewStackLogger() (Logger, error)
- func (c Creator) NewStderrLogger() (Logger, error)
- func (c Creator) NewStdoutLogger() (Logger, error)
- type Fields
- type Level
- type Logger
- type LogrusLogger
- type NullLogger
- type RollbarLogger
- type SentryLogger
- type StackLogger
- func (s *StackLogger) Add(logger Logger)
- func (s *StackLogger) Close()
- func (s *StackLogger) Log(level Level, args ...interface{})
- func (s *StackLogger) WithError(err error) Logger
- func (s *StackLogger) WithField(key string, value interface{}) Logger
- func (s *StackLogger) WithFields(fields Fields) Logger
- func (s *StackLogger) WithRequest(req *http.Request) Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOSEnvMap ¶
Types ¶
type AbstractLogger ¶
type AbstractLogger struct {
Logger
}
func (*AbstractLogger) Close ¶
func (s *AbstractLogger) Close()
func (*AbstractLogger) Debug ¶
func (s *AbstractLogger) Debug(args ...interface{})
func (*AbstractLogger) Debugf ¶
func (s *AbstractLogger) Debugf(format string, args ...interface{})
func (*AbstractLogger) Error ¶
func (s *AbstractLogger) Error(args ...interface{})
func (*AbstractLogger) Errorf ¶
func (s *AbstractLogger) Errorf(format string, args ...interface{})
func (*AbstractLogger) Fatal ¶
func (s *AbstractLogger) Fatal(args ...interface{})
func (*AbstractLogger) Fatalf ¶
func (s *AbstractLogger) Fatalf(format string, args ...interface{})
func (*AbstractLogger) Info ¶
func (s *AbstractLogger) Info(args ...interface{})
func (*AbstractLogger) Infof ¶
func (s *AbstractLogger) Infof(format string, args ...interface{})
func (*AbstractLogger) Logf ¶
func (s *AbstractLogger) Logf(level Level, format string, args ...interface{})
func (*AbstractLogger) Warning ¶
func (s *AbstractLogger) Warning(args ...interface{})
func (*AbstractLogger) Warningf ¶
func (s *AbstractLogger) Warningf(format string, args ...interface{})
func (*AbstractLogger) WithError ¶
func (s *AbstractLogger) WithError(err error) Logger
func (*AbstractLogger) WithField ¶
func (s *AbstractLogger) WithField(key string, value interface{}) Logger
func (*AbstractLogger) WithRequest ¶
func (s *AbstractLogger) WithRequest(req *http.Request) Logger
type ArrayLogger ¶
type ArrayLogger struct { *AbstractLogger // contains filtered or unexported fields }
func NewArrayLogger ¶
func NewArrayLogger(level Level) *ArrayLogger
func (*ArrayLogger) Clone ¶
func (s *ArrayLogger) Clone() *ArrayLogger
func (*ArrayLogger) Log ¶
func (s *ArrayLogger) Log(level Level, args ...interface{})
func (*ArrayLogger) Storage ¶
func (s *ArrayLogger) Storage() []string
func (*ArrayLogger) WithError ¶
func (s *ArrayLogger) WithError(err error) Logger
func (*ArrayLogger) WithFields ¶
func (s *ArrayLogger) WithFields(fields Fields) Logger
func (*ArrayLogger) WithRequest ¶
func (s *ArrayLogger) WithRequest(req *http.Request) Logger
type Creator ¶
func (Creator) NewArrayLogger ¶
func (Creator) NewNullLogger ¶
func (Creator) NewRollbar ¶
func (Creator) NewRollbarLogger ¶
func (Creator) NewSentryHub ¶
func (Creator) NewSentryLogger ¶
func (Creator) NewStackLogger ¶
func (Creator) NewStderrLogger ¶
func (Creator) NewStdoutLogger ¶
type Logger ¶
type Logger interface { WithField(key string, value interface{}) Logger WithFields(fields Fields) Logger WithError(err error) Logger WithRequest(req *http.Request) Logger Log(level Level, args ...interface{}) Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warningf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) Debug(args ...interface{}) Info(args ...interface{}) Warning(args ...interface{}) Error(args ...interface{}) Fatal(args ...interface{}) Close() }
type LogrusLogger ¶
type LogrusLogger struct { *AbstractLogger // contains filtered or unexported fields }
func NewLogrusLogger ¶
func NewLogrusLogger(logger logrus.FieldLogger) *LogrusLogger
func NewStdoutLogger ¶
func NewStdoutLogger(lvl Level) *LogrusLogger
func (*LogrusLogger) Log ¶
func (s *LogrusLogger) Log(level Level, args ...interface{})
func (*LogrusLogger) WithFields ¶
func (s *LogrusLogger) WithFields(fields Fields) Logger
type NullLogger ¶
type NullLogger struct {
*AbstractLogger
}
func NewNullLogger ¶
func NewNullLogger() *NullLogger
func (*NullLogger) Log ¶
func (s *NullLogger) Log(level Level, args ...interface{})
func (*NullLogger) WithFields ¶
func (s *NullLogger) WithFields(fields Fields) Logger
type RollbarLogger ¶
type RollbarLogger struct { *AbstractLogger // contains filtered or unexported fields }
func NewRollbarLogger ¶
func NewRollbarLogger(client *rollbar.Client, level Level) *RollbarLogger
func (*RollbarLogger) Clone ¶
func (s *RollbarLogger) Clone() *RollbarLogger
func (*RollbarLogger) Log ¶
func (s *RollbarLogger) Log(level Level, args ...interface{})
func (*RollbarLogger) WithError ¶
func (s *RollbarLogger) WithError(err error) Logger
func (*RollbarLogger) WithFields ¶
func (s *RollbarLogger) WithFields(fields Fields) Logger
func (*RollbarLogger) WithRequest ¶
func (s *RollbarLogger) WithRequest(req *http.Request) Logger
type SentryLogger ¶
type SentryLogger struct { *AbstractLogger // contains filtered or unexported fields }
func NewSentryLogger ¶
func NewSentryLogger(hub *sentry.Hub, level Level) *SentryLogger
func (*SentryLogger) Clone ¶
func (s *SentryLogger) Clone() *SentryLogger
func (*SentryLogger) Log ¶
func (s *SentryLogger) Log(level Level, args ...interface{})
func (*SentryLogger) WithError ¶
func (s *SentryLogger) WithError(err error) Logger
func (*SentryLogger) WithFields ¶
func (s *SentryLogger) WithFields(fields Fields) Logger
func (*SentryLogger) WithRequest ¶
func (s *SentryLogger) WithRequest(req *http.Request) Logger
type StackLogger ¶
type StackLogger struct { *AbstractLogger // contains filtered or unexported fields }
func NewStackLogger ¶
func NewStackLogger() *StackLogger
func (*StackLogger) Add ¶
func (s *StackLogger) Add(logger Logger)
func (*StackLogger) Close ¶
func (s *StackLogger) Close()
func (*StackLogger) Log ¶
func (s *StackLogger) Log(level Level, args ...interface{})
func (*StackLogger) WithError ¶
func (s *StackLogger) WithError(err error) Logger
func (*StackLogger) WithField ¶
func (s *StackLogger) WithField(key string, value interface{}) Logger
func (*StackLogger) WithFields ¶
func (s *StackLogger) WithFields(fields Fields) Logger
func (*StackLogger) WithRequest ¶
func (s *StackLogger) WithRequest(req *http.Request) Logger
Click to show internal directories.
Click to hide internal directories.