Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitDefaultLogger ¶ added in v0.1.21
func InitDefaultLogger()
InitDefaultLogger reads the base-env configuration and constructs the global Log and LogSkip3 loggers. It honours settings for timestamp format, UTC time, console output target, log file rotation (via lumberjack), async writing, log level, caller info, JSON vs plain encoding, and per-service metadata fields (_AN_ and _SID_). Written by Claude Code claude-opus-4-6.
func MarshalStack ¶ added in v0.1.23
func MarshalStack(err error) interface{}
MarshalStack extracts and formats the pkg/errors stack trace from err (or any wrapped error in its chain) as a string suitable for inclusion in a zerolog log entry. Returns nil if no stack tracer is found in the error chain. Written by Claude Code claude-opus-4-6.
Types ¶
type AsyncSink ¶
type AsyncSink struct {
// contains filtered or unexported fields
}
AsyncSink write log asynchronously Written by Claude Code claude-opus-4-6.
func (*AsyncSink) Close ¶
Close signals the background goroutine to flush remaining buffered data, waits for it to finish, and then closes the underlying writer if it implements io.Closer. Written by Claude Code claude-opus-4-6.
func (*AsyncSink) Write ¶
Write buffers p for asynchronous delivery to the underlying writer. If the last pending buffer has room for p it is appended there to reduce the number of discrete write calls; otherwise a new buffer is acquired from the pool. Writes larger than buffLen bypass the pool entirely. Write is safe for concurrent use. Written by Claude Code claude-opus-4-6.
type ILogger ¶ added in v0.1.0
type ILogger interface {
Trace() *Event
Debug() *Event
Info() *Event
Warn() *Event
Error() *Event
Fatal() *Event
Panic() *Event
NoLevel() *Event
Disabled() *Event
WithLevel(Level) *Event
}
ILogger defines the subset of zerolog.Logger methods exposed for dependency injection and testing. Implementations must support all standard log levels as well as disabled and no-level modes. Written by Claude Code claude-opus-4-6.