zapmod

package
v0.0.0-...-ec8378c Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package zapmod contains utilities for fetching a logger that actually aligns log messages.

Index

Constants

This section is empty.

Variables

View Source
var KBLog logr.Logger

KBLog is a base parent logger.

Log is the base logger used by kubebuilder. It delegates to another logr.Logger. You *must* call SetLogger to get any actual logging.

Functions

func EpochMillisRoundedTimeEncoder

func EpochMillisRoundedTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)

func SetLogger

func SetLogger(l logr.Logger)

SetLogger sets a concrete logging implementation for all deferred Loggers.

func ZapLogger

func ZapLogger(development bool) logr.Logger

ZapLogger is a Logger implementation. If development is true, a Zap development config will be used (stacktraces on warnings, no sampling), otherwise a Zap production config will be used (stacktraces on errors, sampling).

func ZapLoggerTo

func ZapLoggerTo(destWriter io.Writer, development bool) logr.Logger

ZapLoggerTo returns a new Logger implementation using Zap which logs to the given destination, instead of stderr. It otherise behaves like ZapLogger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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