Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(service string, opts ...loggerOpt) (*zap.SugaredLogger, error)
New constructs a Sugared Logger that writes to stdout and provides human-readable timestamps.
func NewStdLogger ¶
func NewStdLogger(log *zap.SugaredLogger) *log.Logger
func WithGCPMapping ¶
func WithGCPMapping() loggerOpt
WithGCPMapping rewrites the zap config to utilize encoding values to conform to the standards used on Google Cloud logging systems. For more information refer to the following Github Issue/Discussion https://github.com/uber-go/zap/discussions/1110#discussioncomment-2955566
func WithOutputPaths ¶
func WithOutputPaths(outputPaths ...string) loggerOpt
WithOutputPaths overrides the default OutputPaths of os.Stdout. Multiple files, URLs, can also be included in this function. For example: `WithOutputPaths("stdout", "/var/logs/myapp.log")` will print to a file and the standard output
func WithZapConfig ¶
WithZapConfig will overwrite the standard configurations provided by `New()` any loggerOpt provided AFTER this function when calling `New()` will continue to modify this provided config.
Types ¶
This section is empty.