zerologcore

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTerminalWriter

func IsTerminalWriter(w io.Writer) bool

IsTerminalWriter reports whether w is a terminal-backed os.File.

func NewLogger

func NewLogger(config Config) zerolog.Logger

NewLogger constructs a zerolog logger for the given writer and format.

Types

type Config

type Config struct {
	Writer   io.Writer
	Format   Format
	TimeZone *time.Location
}

Config controls base zerolog logger construction.

type Format

type Format uint8

Format selects the underlying output encoder.

const (
	AutoFormat Format = iota
	JSONFormat
	ConsoleFormat
)

func ResolveFormat

func ResolveFormat(format Format, writer io.Writer) Format

ResolveFormat resolves auto format using writer terminal detection.

Jump to

Keyboard shortcuts

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