bzerolog

package module
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 7 Imported by: 11

README

bzerolog

codecov

Zerolog brick to be used by Mortar

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsoleWriter

func ConsoleWriter(writer ...io.Writer) io.Writer

ConsoleWriter writes to console in Human Readable format

Note:

It's important NOT to exclude time when using this writer

Types

type ZerologBuilder

type ZerologBuilder interface {
	log.Builder
	// SetWriter set where output should be printed
	SetWriter(writer io.Writer) ZerologBuilder
	// AddStaticFields will always add provided fields to every log entry
	AddStaticFields(fields map[string]interface{}) ZerologBuilder
	// ExcludeTime configures zerolog to exclude any time field
	ExcludeTime() ZerologBuilder
	// SetCustomTimeFormatter sets the time format field, have no effect if ExcludeTime is called
	SetCustomTimeFormatter(format string) ZerologBuilder
	// IncludeCaller adds caller:line to log entry
	IncludeCaller() ZerologBuilder
}

ZerologBuilder is helper builder to configure zerolog instance

func Builder

func Builder() ZerologBuilder

Builder creates a new zerolog builder

Jump to

Keyboard shortcuts

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