Documentation
¶
Overview ¶
Package logging configures Callee's zerolog and slog loggers.
Index ¶
Constants ¶
View Source
const ( LevelTrace = "trace" LevelDebug = "debug" LevelInfo = "info" LevelWarn = "warn" LevelError = "error" )
Variables ¶
This section is empty.
Functions ¶
func RoundElapsed ¶ added in v0.18.0
RoundElapsed reduces elapsed telemetry to whole-second precision.
Types ¶
type JSONLineWriter ¶ added in v0.6.0
type JSONLineWriter struct {
// contains filtered or unexported fields
}
JSONLineWriter wraps raw diagnostic lines in JSON Lines events.
func NewJSONLineWriter ¶ added in v0.6.0
func NewJSONLineWriter(writer io.Writer) *JSONLineWriter
NewJSONLineWriter returns an io.Writer that emits one event per input line.
func (*JSONLineWriter) Flush ¶ added in v0.6.0
func (w *JSONLineWriter) Flush() error
Flush emits the final unterminated line, if any.
type Option ¶
type Option func(*options)
Option configures application logging.
func WithWriter ¶ added in v0.6.0
WithWriter selects where logs are written. The default is standard error.
Click to show internal directories.
Click to hide internal directories.