Discover Packages
github.com/cloudzero/cloudzero-agent
app
logging
package
Version:
v1.1.2
Opens a new window with list of versions in this module.
Published: May 8, 2025
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package logging provides a wrapper around Zerolog.
NewFieldFilterWriter creates a new writer that filters out specified fields
NewLogger creates a new zerolog logger with the requested options
Attr is a custom type to enable dynamic passing of function overloads on the
logger to enable for a dynamic list of zerolog attributes onto a logger.
type LoggerOpt = func(logger *internalLogger) error
WithAttrs adds a list of attributes to add to the logger.
Example:
logger := NewLogger(
WithAttrs(
func(ctx zerolog.Context) zerolog.Context {
return ctx.Str("app", "my-application").Int("version", 1)
},
),
)
WithHook attaches a hook to the logger. This can be called multiple times
WithLevel parses the log level for the logger
WithSink attaches a sink to the logger. This can be called multiple times
WithVersion overrides the default version fetched from the `build` library
Source Files
¶
Directories
¶
Package instr provides instrumentation utilities.
Package instr provides instrumentation utilities.
Package logging contains utilities for logging.
Package logging contains utilities for logging.
Click to show internal directories.
Click to hide internal directories.