static

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 15

Documentation

Overview

Package static provides a simple static logger implementation for easy migration of existing pre-v2 code.

The package is usually imported aliased as "log" to be compatible with the v1 approach.

The static logger instance needs to be initialized during startup of the application using SetLogger.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(err error, msg string, keysAndValues ...interface{})

Error logs an error message with optional key-value pairs. This uses the static logger instance.

func Info

func Info(msg string, keysAndValues ...interface{})

Info logs an informational message with optional key-value pairs. This uses the static logger instance.

func SetLogger

func SetLogger(replacement logr.Logger)

SetLogger sets the static logger instance.

func V

func V(level int) logr.Logger

V returns a logger with the verbosity set to level. This uses the static logger instance.

func WithName

func WithName(name string) logr.Logger

WithName returns a logger with name added to the component. This uses the static logger instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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