tracelog

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: Apache-2.0 Imports: 7 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 Logger

func Logger(ctx context.Context) logr.Logger

Logger returns the logger from the context, the server injects a logger into each request.

func LoggerFlags

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

LoggerFlags adds to viper flags

func NewClientLogger

func NewClientLogger() logr.Logger

NewClientLogger creates a new logger with our setup

func NewInstallClientLogger

func NewInstallClientLogger() logr.Logger

NewInstallClientLogger creates a new logger for the install subcommand

func NewLogger

func NewLogger() logr.Logger

NewLogger creates a new logger with our setup. It only prints messages below TraceLevel(). The starting point for derived loggers is 1. So in the default configuration, TRACE_LEVEL=0, V(1), nothing is printed. TRACE_LEVEL=1 shows simple log statements, everything above like `details`, or V(3) needs a higher TRACE_LEVEL.

func NewServerLogger

func NewServerLogger() logr.Logger

NewServerLogger creates a new logger for server subcommand

func TraceLevel

func TraceLevel() int

TraceLevel returns the trace-level argument

Types

type CtxLoggerKey

type CtxLoggerKey struct{}

Jump to

Keyboard shortcuts

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