Documentation ¶
Index ¶
- type DefaultLogger
- func (l *DefaultLogger) Debug() *zerolog.Event
- func (l *DefaultLogger) Err(err error) *zerolog.Event
- func (l *DefaultLogger) Error() *zerolog.Event
- func (l *DefaultLogger) Fatal() *zerolog.Event
- func (l *DefaultLogger) Info() *zerolog.Event
- func (l *DefaultLogger) Log() *zerolog.Event
- func (l *DefaultLogger) RegisterSSEWriter(sse *sse.Server)
- func (l *DefaultLogger) SetLogLevel(level string)
- func (l *DefaultLogger) Trace() *zerolog.Event
- func (l *DefaultLogger) Warn() *zerolog.Event
- func (l *DefaultLogger) With() zerolog.Context
- type Formatter
- type LogMessage
- type Logger
- type SSEWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultLogger ¶
type DefaultLogger struct {
// contains filtered or unexported fields
}
DefaultLogger default logging controller
func (*DefaultLogger) Debug ¶
func (l *DefaultLogger) Debug() *zerolog.Event
Debug log something at debug level.
func (*DefaultLogger) Err ¶
func (l *DefaultLogger) Err(err error) *zerolog.Event
Err log something at Err level
func (*DefaultLogger) Error ¶
func (l *DefaultLogger) Error() *zerolog.Event
Error log something at Error level
func (*DefaultLogger) Fatal ¶
func (l *DefaultLogger) Fatal() *zerolog.Event
Fatal log something at fatal level. This will panic!
func (*DefaultLogger) Info ¶
func (l *DefaultLogger) Info() *zerolog.Event
Info log something at fatal level.
func (*DefaultLogger) Log ¶
func (l *DefaultLogger) Log() *zerolog.Event
Log log something at fatal level.
func (*DefaultLogger) RegisterSSEWriter ¶ added in v1.29.0
func (l *DefaultLogger) RegisterSSEWriter(sse *sse.Server)
func (*DefaultLogger) SetLogLevel ¶
func (l *DefaultLogger) SetLogLevel(level string)
func (*DefaultLogger) Trace ¶
func (l *DefaultLogger) Trace() *zerolog.Event
Trace log something at fatal level. This will panic!
func (*DefaultLogger) Warn ¶
func (l *DefaultLogger) Warn() *zerolog.Event
Warn log something at warning level.
type Formatter ¶ added in v1.29.0
type Formatter func(interface{}) string
Formatter transforms the input into a formatted string.
type LogMessage ¶
type LogMessage struct { Time string `json:"time"` Level string `json:"level"` Message string `json:"message"` }
func (LogMessage) Bytes ¶ added in v1.29.0
func (m LogMessage) Bytes() ([]byte, error)
type Logger ¶
type Logger interface { Log() *zerolog.Event Fatal() *zerolog.Event Err(err error) *zerolog.Event Error() *zerolog.Event Warn() *zerolog.Event Info() *zerolog.Event Trace() *zerolog.Event Debug() *zerolog.Event With() zerolog.Context RegisterSSEWriter(sse *sse.Server) SetLogLevel(level string) }
Logger interface
Click to show internal directories.
Click to hide internal directories.