package log

import "github.com/containerd/nri/pkg/log"

Index

Functions

func Debugf

func Debugf(ctx context.Context, format string, args ...interface{})

Debugf logs a formatted debug message.

func Errorf

func Errorf(ctx context.Context, format string, args ...interface{})

Errorf logs a formatted error message.

func Infof

func Infof(ctx context.Context, format string, args ...interface{})

Infof logs a formatted informational message.

func Set

func Set(l Logger)

Set the logger used by NRI.

func Warnf

func Warnf(ctx context.Context, format string, args ...interface{})

Warnf logs a formatted warning message.

Types

type Logger

type Logger interface {
	Debugf(ctx context.Context, format string, args ...interface{})
	Infof(ctx context.Context, format string, args ...interface{})
	Warnf(ctx context.Context, format string, args ...interface{})
	Errorf(ctx context.Context, format string, args ...interface{})
}

Logger is the interface NRI uses for logging.

func Get

func Get() Logger

Get the logger used by NRI.

Source Files

log.go

Version
v0.6.0
Published
Feb 3, 2024
Platform
js/wasm
Imports
2 packages
Last checked
11 hours ago

Tools for package owners.