logger

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package logger provides a logging capability for toolhive for running locally as a CLI and in Kubernetes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DPanic added in v0.2.11

func DPanic(msg string)

DPanic logs a message at error level using the singleton logger and panics the program.

func DPanicf added in v0.2.11

func DPanicf(msg string, args ...any)

DPanicf logs a message at error level using the singleton logger and panics the program.

func DPanicw added in v0.2.11

func DPanicw(msg string, keysAndValues ...any)

DPanicw logs a message at error level using the singleton logger with additional key-value pairs and panics the program.

func Debug added in v0.0.33

func Debug(msg string)

Debug logs a message at debug level using the singleton logger.

func Debugf added in v0.0.33

func Debugf(msg string, args ...any)

Debugf logs a message at debug level using the singleton logger.

func Debugw added in v0.2.11

func Debugw(msg string, keysAndValues ...any)

Debugw logs a message at debug level using the singleton logger with additional key-value pairs.

func Error added in v0.0.33

func Error(msg string)

Error logs a message at error level using the singleton logger.

func Errorf added in v0.0.33

func Errorf(msg string, args ...any)

Errorf logs a message at error level using the singleton logger.

func Errorw added in v0.2.11

func Errorw(msg string, keysAndValues ...any)

Errorw logs a message at error level using the singleton logger with additional key-value pairs.

func Fatal added in v0.2.11

func Fatal(msg string)

Fatal logs a message at error level using the singleton logger and exits the program.

func Fatalf added in v0.2.11

func Fatalf(msg string, args ...any)

Fatalf logs a message at error level using the singleton logger and exits the program.

func Fatalw added in v0.2.11

func Fatalw(msg string, keysAndValues ...any)

Fatalw logs a message at error level using the singleton logger with additional key-value pairs and exits the program.

func Info added in v0.0.33

func Info(msg string)

Info logs a message at info level using the singleton logger.

func Infof added in v0.0.33

func Infof(msg string, args ...any)

Infof logs a message at info level using the singleton logger.

func Infow added in v0.2.11

func Infow(msg string, keysAndValues ...any)

Infow logs a message at info level using the singleton logger with additional key-value pairs.

func Initialize

func Initialize()

Initialize creates and configures the appropriate logger. If the UNSTRUCTURED_LOGS is set to true, it will output plain log message with only time and LogLevelType (INFO, DEBUG, ERROR, WARN)). Otherwise it will create a standard structured slog logger

func NewLogr added in v0.0.33

func NewLogr() logr.Logger

NewLogr returns a logr.Logger which uses zap logger

func Panic added in v0.0.34

func Panic(msg string)

Panic logs a message at error level using the singleton logger and panics the program.

func Panicf added in v0.0.34

func Panicf(msg string, args ...any)

Panicf logs a message at error level using the singleton logger and panics the program.

func Panicw added in v0.2.11

func Panicw(msg string, keysAndValues ...any)

Panicw logs a message at error level using the singleton logger with additional key-value pairs and panics the program.

func Warn added in v0.0.33

func Warn(msg string)

Warn logs a message at warning level using the singleton logger.

func Warnf added in v0.0.33

func Warnf(msg string, args ...any)

Warnf logs a message at warning level using the singleton logger.

func Warnw added in v0.2.11

func Warnw(msg string, keysAndValues ...any)

Warnw logs a message at warning level using the singleton logger with additional key-value pairs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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