package
Version:
v0.15.2
Opens a new window with list of versions in this module.
Published: Nov 25, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 13
Opens a new window with list of known importers.
Documentation
¶
Package zctx is a context-aware zap logger.
Base initializes root logger for using as a base context. Should be done early.
The span and trace IDs must not be added to the base logger because zap
can't update or replace fields.
From returns zap.Logger from context.
Start allocates new span logger and returns new context with it.
Use Start to reduce allocations during From, caching the span-scoped logger.
Should be same as ctx = With(ctx), but more effective.
With returns new context with provided zap fields.
The span and trace IDs must not be added to the base logger because zap
can't update or replace fields.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.