logging

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

package logging initializes the root logger and provides some helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(verbosity *int)

Init sets verbosity based on flag and environment. Sets the flag to actual setting.

func JSON

func JSON(v any) logr.Marshaler

JSON wraps a value so it will be printed as JSON if logged.

func JSONString

func JSONString(v any) string

JSONString returns the JSON marshaled string from v, or the error message if marshal fails

func Log

func Log() logr.Logger

Log returns the root logger.

func LogWriter added in v0.1.1

func LogWriter() io.Writer

LogWriter returns the destination for the root logger, so other logs can be directed to it.

Types

type URLs

type URLs []url.URL

Log url slices properly, url.URL only has a pointer-receiver String() method.

func (URLs) MarshalLog

func (u URLs) MarshalLog() any

Jump to

Keyboard shortcuts

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