Documentation
¶
Index ¶
- Constants
- type DeepStackError
- type DeepStackLogger
- type DeepStackLoggerImpl
- func (m *DeepStackLoggerImpl) AddContext(err error, context ...any) error
- func (m *DeepStackLoggerImpl) Debug(msg string, kv ...any)
- func (m *DeepStackLoggerImpl) Error(msg string, kv ...any)
- func (m *DeepStackLoggerImpl) Info(msg string, kv ...any)
- func (m *DeepStackLoggerImpl) NewError(msg string, kv ...any) error
- func (m *DeepStackLoggerImpl) Warn(msg string, kv ...any)
- type LogRecord
- type LoggingBackend
- type LoggingBackendImpl
- func (s *LoggingBackendImpl) CreateLogRecord(level string, msg string) *LogRecord
- func (s *LoggingBackendImpl) HandleRecord(logRecord *LogRecord)
- func (s *LoggingBackendImpl) LogWarning(message string, kv ...any)
- func (s *LoggingBackendImpl) Println(message string)
- func (s *LoggingBackendImpl) ShouldLogBeSkipped(level string) bool
Constants ¶
View Source
const (
ErrorField = "error"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeepStackError ¶
func (*DeepStackError) Error ¶
func (d *DeepStackError) Error() string
type DeepStackLogger ¶
type DeepStackLogger interface {
Debug(msg string, kv ...any)
Info(msg string, kv ...any)
Warn(msg string, kv ...any)
Error(msg string, kv ...any)
NewError(msg string, kv ...any) error
}
func NewDeepStackLogger ¶
func NewDeepStackLogger(logLevel string, enableWarningsForNonDeepStackErrors bool) DeepStackLogger
idea for later: add the software version to the log so that "source" attribute deterministally references its origin
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, kv ...any)
func (*DeepStackLoggerImpl) Error ¶
func (m *DeepStackLoggerImpl) Error(msg string, kv ...any)
func (*DeepStackLoggerImpl) Info ¶
func (m *DeepStackLoggerImpl) Info(msg string, kv ...any)
func (*DeepStackLoggerImpl) NewError ¶
func (m *DeepStackLoggerImpl) NewError(msg string, kv ...any) error
func (*DeepStackLoggerImpl) Warn ¶
func (m *DeepStackLoggerImpl) Warn(msg string, kv ...any)
type LoggingBackend ¶
type LoggingBackendImpl ¶
type LoggingBackendImpl struct {
// contains filtered or unexported fields
}
func (*LoggingBackendImpl) CreateLogRecord ¶
func (s *LoggingBackendImpl) CreateLogRecord(level string, msg string) *LogRecord
func (*LoggingBackendImpl) HandleRecord ¶
func (s *LoggingBackendImpl) HandleRecord(logRecord *LogRecord)
func (*LoggingBackendImpl) LogWarning ¶
func (s *LoggingBackendImpl) LogWarning(message string, kv ...any)
func (*LoggingBackendImpl) Println ¶
func (s *LoggingBackendImpl) Println(message string)
func (*LoggingBackendImpl) ShouldLogBeSkipped ¶
func (s *LoggingBackendImpl) ShouldLogBeSkipped(level string) bool
Click to show internal directories.
Click to hide internal directories.