Documentation
¶
Index ¶
- Constants
- func NewFileHandler(opts *slog.HandlerOptions) *slog.JSONHandler
- type ConsoleHandler
- type DeepStackError
- type DeepStackLogger
- type DeepStackLoggerImpl
- func (m *DeepStackLoggerImpl) AddContext(err error, context ...any) error
- func (m *DeepStackLoggerImpl) Debug(msg string, context ...any)
- func (m *DeepStackLoggerImpl) Error(msg string, context ...any)
- func (m *DeepStackLoggerImpl) Info(msg string, context ...any)
- func (m *DeepStackLoggerImpl) NewError(msg string, context ...any) error
- func (m *DeepStackLoggerImpl) Warn(msg string, context ...any)
- type LoggingBackend
- type LoggingBackendImpl
- type Record
- type StackTracer
- type StackTracerImpl
Constants ¶
View Source
const (
ErrorField = "error"
)
Variables ¶
This section is empty.
Functions ¶
func NewFileHandler ¶ added in v0.0.4
func NewFileHandler(opts *slog.HandlerOptions) *slog.JSONHandler
Types ¶
type ConsoleHandler ¶ added in v0.0.4
type ConsoleHandler struct {
// contains filtered or unexported fields
}
func NewConsoleHandler ¶ added in v0.0.4
func NewConsoleHandler(opts *slog.HandlerOptions) *ConsoleHandler
type DeepStackError ¶
func (*DeepStackError) Error ¶
func (d *DeepStackError) Error() string
type DeepStackLogger ¶
type DeepStackLogger interface {
Debug(msg string, context ...any)
Info(msg string, context ...any)
Warn(msg string, context ...any)
Error(msg string, context ...any)
NewError(msg string, context ...any) error
}
func NewDeepStackLogger ¶
func NewDeepStackLogger(logLevel string) DeepStackLogger
type DeepStackLoggerImpl ¶
type DeepStackLoggerImpl struct {
// contains filtered or unexported fields
}
func (*DeepStackLoggerImpl) AddContext ¶ added in v0.0.3
func (m *DeepStackLoggerImpl) AddContext(err error, context ...any) error
func (*DeepStackLoggerImpl) Debug ¶
func (m *DeepStackLoggerImpl) Debug(msg string, context ...any)
func (*DeepStackLoggerImpl) Error ¶
func (m *DeepStackLoggerImpl) Error(msg string, context ...any)
func (*DeepStackLoggerImpl) Info ¶
func (m *DeepStackLoggerImpl) Info(msg string, context ...any)
func (*DeepStackLoggerImpl) NewError ¶
func (m *DeepStackLoggerImpl) NewError(msg string, context ...any) error
func (*DeepStackLoggerImpl) Warn ¶
func (m *DeepStackLoggerImpl) Warn(msg string, context ...any)
type LoggingBackend ¶
type LoggingBackendImpl ¶
type LoggingBackendImpl struct {
// contains filtered or unexported fields
}
TODO add tests, maybe also dependencies, hide slog dependency somehow?
func (*LoggingBackendImpl) LogRecord ¶ added in v0.0.4
func (s *LoggingBackendImpl) LogRecord(logRecord *Record)
func (*LoggingBackendImpl) LogWarning ¶
func (s *LoggingBackendImpl) LogWarning(message string, kv ...any)
func (*LoggingBackendImpl) PrintStackTrace ¶ added in v0.0.4
func (s *LoggingBackendImpl) PrintStackTrace(stackTrace string)
func (*LoggingBackendImpl) ShouldLogBeSkipped ¶
func (s *LoggingBackendImpl) ShouldLogBeSkipped(level string) bool
type StackTracer ¶ added in v0.0.4
type StackTracer interface {
GetStackTrace() string
}
type StackTracerImpl ¶ added in v0.0.4
type StackTracerImpl struct{}
func (*StackTracerImpl) GetStackTrace ¶ added in v0.0.4
func (s *StackTracerImpl) GetStackTrace() string
Click to show internal directories.
Click to hide internal directories.