logging

package
v0.7.0-RC-1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(c *Config) zerolog.Logger

Types

type Config

type Config struct {
	Level     string          `yaml:"level" default:"info" validate:"oneof=trace debug info error fatal panic"`
	Target    string          `yaml:"target" default:"stdout" validate:"required,oneof=stdout stderr"`
	Format    string          `yaml:"format" default:"console" validate:"oneof=json console"`
	Caller    bool            `yaml:"caller" default:"true"`
	Timestamp TimestampConfig `yaml:"timestamp" mapstructure:"timestamp"`
}

type TimestampConfig

type TimestampConfig struct {
	Enabled bool   `yaml:"enabled" default:"true"`
	Format  string `yaml:"format" default:"2006-01-0215:04:05.000Z07:00"`
}

Jump to

Keyboard shortcuts

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