logutils

package
v0.0.0-...-6898250 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReopenableLogger

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

ReopenableLogger is only designed for container logging purpose when container runtime is in runp mode. ReopenableLogger will work along with exec.Cmd.Stdout/Stderr and ContainerLogManager, and will perform reopen when CRI interface ReopenContainerLog is called.

func NewReopenableLogger

func NewReopenableLogger(fileName string) *ReopenableLogger

func (*ReopenableLogger) Close

func (l *ReopenableLogger) Close() error

Close file to ensure data is all written.

func (*ReopenableLogger) ReopenFile

func (l *ReopenableLogger) ReopenFile() error

call ReopenFile within CRI interface ReopenContainerLog

func (*ReopenableLogger) Write

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

Write into file, if nil open a new file

Jump to

Keyboard shortcuts

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