logging

package
v0.0.0-...-a79a6e6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstance

func GetInstance() *zerolog.Logger

func SetLogLevel

func SetLogLevel(logLevel string)

Types

type Config

type Config struct {
	ConsoleLoggingEnabled bool   // Enable console logging
	EncodeLogsAsJSON      bool   // EncodeLogsAsJSON makes the log framework log JSON
	FileLoggingEnabled    bool   // FileLoggingEnabled makes the framework log to a file, the fields below can be skipped if this value is false!
	Directory             string // Directory to log to to when filelogging is enabled
	Filename              string // Filename is the name of the logfile which will be placed inside the directory
	MaxSize               int    // MaxSize the max size in MB of the logfile before it's rolled
	MaxBackups            int    // MaxBackups the max number of rolled files to keep
	MaxAge                int    // MaxAge the max age in days to keep a logfile
	Compress              bool   // Compress the rotated files
}

Config - Custom application config

Jump to

Keyboard shortcuts

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