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.9.0 (latest)
Published
Dec 12, 2024
Platform
linux/amd64
Imports
2 packages
Last checked
2 months ago

Tools for package owners.