zerolog_cli_adapter

package module
v0.0.0-...-8059f5b Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 2 Imported by: 1

README

zerolog_cli_adapter

Adapter for configuring logging with flags

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggerGenerator

type LoggerGenerator struct {
	// contains filtered or unexported fields
}

func NewLoggerGenerator

func NewLoggerGenerator(l zerolog.Logger) *LoggerGenerator

Create a new *LoggerGenerator with the passed base logger

Configure it with lg.UpdateFlagSet and flagset.Parse.

Retrieve configured logger with lg.Logger.

func (*LoggerGenerator) Logger

func (lg *LoggerGenerator) Logger() zerolog.Logger

Returns the configured logger flags must be parsed before calling this.

func (*LoggerGenerator) UpdateFlagSet

func (lg *LoggerGenerator) UpdateFlagSet(flagSet *flag.FlagSet)

Modifies the passed-in FlagSet with the options used by this library:

-v, -verbose, -debug, -trace, -quiet, and -silent

Jump to

Keyboard shortcuts

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