logging

package
v0.30.3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Package loggingRedirect - Creates a log file the redirects STD output.

Index

Constants

View Source
const BUFFER_SIZE = 1024

Variables

This section is empty.

Functions

func Forward

func Forward(ctx context.Context, sendFunc func([]byte, error) error, recFunc func() ([]byte, error)) error

func ReceiveFile

func ReceiveFile(ctx context.Context, filename string, recFunc func() ([]byte, error)) error

func RedirectStdErr

func RedirectStdErr(file *os.File)

func RestoreOutput

func RestoreOutput()

RestoreOutput

func StartRedirectingOutput

func StartRedirectingOutput(logFileAbsolutePath string, logFileName string) error

StartRedirectingOutput

func UploadFile

func UploadFile(ctx context.Context, filename string, sendFunc func([]byte, error) error) error

Types

type DefaultLogger added in v0.28.3

type DefaultLogger struct{}

DefaultLogger is a simple logger that writes to stdout

func (*DefaultLogger) Error added in v0.28.3

func (d *DefaultLogger) Error(err error, msg string, keysAndValues ...interface{})

func (*DefaultLogger) Info added in v0.28.3

func (d *DefaultLogger) Info(msg string, keysAndValues ...interface{})

type Logger added in v0.28.3

type Logger interface {
	Info(msg string, keysAndValues ...interface{})
	Error(err error, msg string, keysAndValues ...interface{})
}

type LogrLogger added in v0.28.3

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

func NewLogrLogger added in v0.28.3

func NewLogrLogger(logger logr.Logger) *LogrLogger

NewLogrLogger creates a new LogrLogger instance that wraps a logr.Logger

func (*LogrLogger) Error added in v0.28.3

func (l *LogrLogger) Error(err error, msg string, keysAndValues ...interface{})

Error logs an error level message

func (*LogrLogger) Info added in v0.28.3

func (l *LogrLogger) Info(msg string, keysAndValues ...interface{})

Info logs an info level message

Jump to

Keyboard shortcuts

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