commonlog

package
v0.0.0-...-8f1e690 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *LogCliConfig) zerolog.Logger

Types

type CheckedFormat

type CheckedFormat struct {
	kong.MapperValue
	// contains filtered or unexported fields
}

func (*CheckedFormat) Decode

func (f *CheckedFormat) Decode(ctx *kong.DecodeContext) error

func (*CheckedFormat) Set

func (f *CheckedFormat) Set(s string) error

func (*CheckedFormat) String

func (f *CheckedFormat) String() string

type CheckedLevel

type CheckedLevel struct {
	kong.MapperValue
	// contains filtered or unexported fields
}

func (*CheckedLevel) Decode

func (l *CheckedLevel) Decode(ctx *kong.DecodeContext) error

func (*CheckedLevel) Set

func (l *CheckedLevel) Set(s string) error

func (*CheckedLevel) String

func (l *CheckedLevel) String() string

type LogCli

type LogCli struct {
	LogCliConfig `embed prefix:"log."`
}

type LogCliConfig

type LogCliConfig struct {
	Format CheckedFormat `name:"format" help:"Output format of log messages. One of: [console, json, json-sd]" default:"console" env:"LOG_FORMAT"`
	Level  CheckedLevel  `` /* 158-byte string literal not displayed */
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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