logger

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: Apache-2.0 Imports: 9 Imported by: 12

Documentation

Overview

Package logger implements utility routines to initialize the logging facility used by OSM components.

Index

Constants

This section is empty.

Variables

View Source
var AllowedLevels = []string{"debug", "info", "warn", "error", "fatal", "panic", "disabled", "trace"}

AllowedLevels is the list of allowed log levels for OSM Controller.

Functions

func New

func New(component string) zerolog.Logger

New creates a new zerolog.Logger

func NewPretty

func NewPretty(component string) zerolog.Logger

NewPretty creates a new zerolog.Logger, which emits human-readable log messages

func SetLogLevel

func SetLogLevel(verbosity string) error

SetLogLevel sets the global logging level

Types

type CallerHook

type CallerHook struct{}

CallerHook implements zerolog.Hook interface.

func (CallerHook) Run

func (h CallerHook) Run(e *zerolog.Event, _ zerolog.Level, _ string)

Run adds additional context

Jump to

Keyboard shortcuts

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