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) RegisterSSEHook(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 LogMessage
- type Logger
- type ServerSentEventHook
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) RegisterSSEHook ¶
func (l *DefaultLogger) RegisterSSEHook(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 LogMessage ¶
type LogMessage struct { Time string `json:"time"` Level string `json:"level"` Message string `json:"message"` }
func (LogMessage) ToJsonString ¶
func (m LogMessage) ToJsonString() string
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 RegisterSSEHook(sse *sse.Server) SetLogLevel(level string) }
Logger interface
type ServerSentEventHook ¶
type ServerSentEventHook struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.