log

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package log provides logging capability. It exports two loggers: DefaultLogger and Logger. DefaultLogger must only be used before having initialized Logger through InitLogger.

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultLogger is initialized at startup time and must only be used by any package that wants to produce log lines
	// before Logger is initialized through InitLogger.
	DefaultLogger = getProductionLogger()
	// Logger is the main exported logger. It must be initialized through InitLogger.
	Logger logr.Logger
)

Functions

func InitLogger

func InitLogger(profile Profile) error

InitLogger initialized the global Logger instance.

Types

type Profile

type Profile string

Profile is the logging profile.

const (
	// ProfileProduction denotes a production-grade logger.
	ProfileProduction Profile = "prod"
	// ProfileDevelopment denotes a logger useful during the developing phase.
	ProfileDevelopment Profile = "dev"
)

Jump to

Keyboard shortcuts

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