Categorygithub.com/hdecarne-github/go-log
modulepackage
0.1.2
Repository: https://github.com/hdecarne-github/go-log.git
Documentation: pkg.go.dev

# README

Common Go logging code shared between my projects

GoDoc Build Coverage Go Report Card

License

This project is subject to the the MIT License. See LICENSE information for details.

# Packages

Package console provides console logging related functionality.
Package file provides file logging related functionality.
Package syslog provides syslog logging related functionality.

# Functions

NewLogger creates a new [github.com/rs/zerolog.Logger] for the given options.
ResetRootLogger resets the root logger to it's default.
RootLogger gets the current root logger.
SetLevel sets the log level.
SetRootLogger sets a new root logger as well as log level and time field format.
SetRootLoggerFromConfig sets a new root logger as well as log level and time field format using a [github.com/hdecarne-github/go-log/Config] interface.
SetTimeFieldFormat sets the time field format.

# Structs

YAMLConfig supports a YAML file based logging configuration.

# Interfaces

Config provides a plugable interface for runtime logging configuration.