Documentation ¶
Index ¶
- Constants
- func FindLogLevel(logLevel string) (zapcore.Level, error)
- func New(prettyLogging bool, debug bool, level zap.AtomicLevel) *zap.Logger
- func RequestIDFromContext(ctx context.Context) string
- func WithRequestID(reqID string) zap.Field
- func WithRequestIDFromContext(ctx context.Context) zap.Field
- type Prettifier
- type PrettifierConfig
- type RequestIDKey
Constants ¶
View Source
const ( RequestIDHeader = "X-Request-Id" // environment variables WgCloudEnvironmentID = "WG_CLOUD_ENVIRONMENT_ID" WgCloudProjectID = "WG_CLOUD_PROJECT_ID" WgCloudDeploymentID = "WG_CLOUD_DEPLOYMENT_ID" )
Variables ¶
This section is empty.
Functions ¶
func RequestIDFromContext ¶ added in v0.117.0
func WithRequestID ¶ added in v0.117.0
Types ¶
type Prettifier ¶ added in v0.166.0
type Prettifier struct {
// contains filtered or unexported fields
}
func NewPrettifier ¶ added in v0.166.0
func NewPrettifier(config PrettifierConfig) *Prettifier
func (*Prettifier) PrettifyJSON ¶ added in v0.166.0
type PrettifierConfig ¶ added in v0.166.0
type RequestIDKey ¶ added in v0.117.0
type RequestIDKey struct{}
Click to show internal directories.
Click to hide internal directories.