Documentation
¶
Overview ¶
Package logging provides loggers for Kopia.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NullLogger = zap.NewNop().Sugar()
NullLogger represents a singleton logger that discards all output.
Functions ¶
func Module ¶ added in v0.9.1
Module returns an function that returns a logger for a given module when provided with a context.
func WithAdditionalLogger ¶ added in v0.14.0
func WithAdditionalLogger(ctx context.Context, fact LoggerFactory) context.Context
WithAdditionalLogger returns a context where all logging is emitted the original output plus the provided logger factory.
func WithLogger ¶
func WithLogger(ctx context.Context, l LoggerFactory) context.Context
WithLogger returns a derived context with associated logger.
Types ¶
type LoggerFactory ¶ added in v0.9.1
LoggerFactory retrieves a named logger for a given module.
func ToWriter ¶ added in v0.11.0
func ToWriter(w io.Writer) LoggerFactory
ToWriter returns LoggerFactory that uses given writer for log output (unadorned).
Click to show internal directories.
Click to hide internal directories.