Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶ added in v0.14.0
type Option func(*config) error
Option is a functional option for configuring the stdout output.
func WithFlushInterval ¶ added in v0.14.0
WithFlushInterval sets the interval at which the internal buffer is flushed to stdout.
type StdoutOutput ¶
type StdoutOutput struct {
// contains filtered or unexported fields
}
StdoutOutput writes log records to standard output via a buffered writer. Records are batched in memory and flushed to os.Stdout periodically, reducing per-record syscall overhead under high worker counts.
func New ¶
func New(logger *zap.Logger, opts ...Option) (*StdoutOutput, error)
New creates a new stdout output. The goroutine that drives periodic flushing starts immediately and runs until Stop is called.
Click to show internal directories.
Click to hide internal directories.