zapfx

package
v0.0.0-...-6b7fec4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigurationKey is the portion of the configuration that this package reads.
	ConfigurationKey = "logging"
)

Variables

Module provides a zap logger for structured logging.

In YAML, logging configuration might look like this:

logging:
  level: info
  development: false
  sampling:
    initial: 100
    thereafter: 100
  encoding: json

Functions

This section is empty.

Types

type NewMortarLogParams

type NewMortarLogParams struct {
	fx.In

	Logger *zap.Logger
}

type NewMortarLogResult

type NewMortarLogResult struct {
	fx.Out

	Logger mortarLog.Logger
}

type NewZapParams

type NewZapParams struct {
	fx.In

	Config    config.Provider
	Lifecycle fx.Lifecycle
}

NewZapParams defines the dependencies of the zapfx module.

type NewZapResult

type NewZapResult struct {
	fx.Out

	Level  zap.AtomicLevel
	Logger *zap.Logger
}

NewZapResult defines the objects that the zapfx module provides.

func NewZap

func NewZap(p NewZapParams) (NewZapResult, error)

NewZap exports functionality similar to Module, but allows the caller to wrap or modify NewZapResult. Most users should use Module instead.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL