log

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStandardLoggerFromLogr added in v0.1.9

func NewStandardLoggerFromLogr(logger *logr.Logger) *log.Logger

NewStandardLoggerFromLogr 函数创建一个新的标准日志记录器,该记录器使用 logr.Logger 作为底层写入器。 The NewStandardLoggerFromLogr function creates a new standard logger that uses logr.Logger as the underlying writer.

Types

type LogrAdapter added in v0.1.9

type LogrAdapter struct {
	// contains filtered or unexported fields
}

LogrAdapter 结构体实现了 io.Writer 接口,用于将标准日志适配到 logr.Logger。 The LogrAdapter struct implements the io.Writer interface to adapt standard logs to logr.Logger.

func (*LogrAdapter) Write added in v0.1.9

func (l *LogrAdapter) Write(p []byte) (n int, err error)

Write 方法实现了 io.Writer 接口,将字节切片转换为字符串并写入日志。 The Write method implements the io.Writer interface, converting byte slices to strings and writing them to the log.

Jump to

Keyboard shortcuts

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