tracelog

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package tracelog provides a logger for debugging and tracing This logger will not print anything, unless TRACE_LEVEL is at least 1

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerFlags

func LoggerFlags(pf *flag.FlagSet, argToEnv map[string]string)

LoggerFlags adds to viper flags

func NewLogger

func NewLogger() logr.Logger

NewLogger returns a logger based on the trace-output configuration

func NewStdrLogger added in v0.5.1

func NewStdrLogger() logr.Logger

NewStdrLogger returns a stdr logger

func NewZapLogger added in v0.4.0

func NewZapLogger() logr.Logger

NewZapLogger creates a new zap logger with our setup. It only prints messages below Zap uses semantically named levels for logging (DebugLevel, InfoLevel, WarningLevel, ...). Logr uses arbitrary numeric levels. By default logr's V(0) is zap's InfoLevel and V(1) is zap's DebugLevel (which is numerically -1). Zap does not have named levels that are more verbose than DebugLevel, but it's possible to fake it.

https://github.com/go-logr/zapr#increasing-verbosity

func TraceLevel

func TraceLevel() int

TraceLevel returns the trace-level argument

func TraceOutput added in v0.5.1

func TraceOutput() string

TraceOutput returns the trace-output argument

Types

This section is empty.

Jump to

Keyboard shortcuts

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