Documentation
¶
Index ¶
- type ContextLogger
- func (cl *ContextLogger) Debug(message string)
- func (cl *ContextLogger) Debugf(format string, params ...any)
- func (cl *ContextLogger) Error(err error, message string)
- func (cl *ContextLogger) Errorf(err error, format string, params ...any)
- func (cl *ContextLogger) Fatal(err error, message string)
- func (cl *ContextLogger) Fatalf(err error, format string, params ...any)
- func (cl *ContextLogger) Info(message string)
- func (cl *ContextLogger) Infof(format string, params ...any)
- func (cl *ContextLogger) Warn(message string)
- func (cl *ContextLogger) Warnf(format string, params ...any)
- type JsonLogWriter
- type Level
- type LogWriter
- type Logger
- type TextLogWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextLogger ¶
type ContextLogger struct { Context string // contains filtered or unexported fields }
func NewContextLogger ¶
func NewContextLogger(lw LogWriter, context string) *ContextLogger
func (*ContextLogger) Debug ¶
func (cl *ContextLogger) Debug(message string)
func (*ContextLogger) Debugf ¶
func (cl *ContextLogger) Debugf(format string, params ...any)
func (*ContextLogger) Error ¶
func (cl *ContextLogger) Error(err error, message string)
func (*ContextLogger) Errorf ¶
func (cl *ContextLogger) Errorf(err error, format string, params ...any)
func (*ContextLogger) Fatal ¶
func (cl *ContextLogger) Fatal(err error, message string)
func (*ContextLogger) Fatalf ¶
func (cl *ContextLogger) Fatalf(err error, format string, params ...any)
func (*ContextLogger) Info ¶
func (cl *ContextLogger) Info(message string)
func (*ContextLogger) Infof ¶
func (cl *ContextLogger) Infof(format string, params ...any)
func (*ContextLogger) Warn ¶
func (cl *ContextLogger) Warn(message string)
func (*ContextLogger) Warnf ¶
func (cl *ContextLogger) Warnf(format string, params ...any)
type JsonLogWriter ¶
type JsonLogWriter struct {
// contains filtered or unexported fields
}
func NewJsonLogWriter ¶
func NewJsonLogWriter(out io.Writer, minLevel Level) *JsonLogWriter
type Logger ¶
type Logger interface { Info(message string) Infof(format string, params ...any) Warn(message string) Warnf(format string, params ...any) Debug(message string) Debugf(format string, params ...any) Error(err error, message string) Errorf(err error, format string, params ...any) Fatal(err error, message string) Fatalf(err error, format string, params ...any) }
type TextLogWriter ¶
type TextLogWriter struct {
// contains filtered or unexported fields
}
func NewTextLogWriter ¶
func NewTextLogWriter(out io.Writer, minLevel Level) *TextLogWriter
Click to show internal directories.
Click to hide internal directories.