logging

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package logging contains tools for working with logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewZerolog

func NewZerolog(cfg ZerologCfg, writer io.Writer) zerolog.Logger

NewZerolog creates instance of zerolog logger.

Types

type ZerologCfg

type ZerologCfg struct {
	Colors           bool
	Pretty           bool
	Caller           bool
	LevelFieldName   string
	MessageFieldName string
	TimeFieldName    string
	TimeFormat       string
	Level            zerolog.Level
	DurationUnit     time.Duration
}

ZerologCfg is a params for zerolog logger instance creation.

func NewZerologCfgViper

func NewZerologCfgViper(v *viper.Viper) ZerologCfg

NewZerologCfgViper creates zerolog config from viper config instance.

Jump to

Keyboard shortcuts

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