debug

package
v0.0.0-...-fc09d8a Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package debug provides utilities for enhanced logging within the shim loggers for containerd, focusing on system journal integration and stack trace capture on signal reception.

Index

Constants

View Source
const (

	// INFO represents a log level for informational messages.
	INFO = "info"
	// ERROR represents a log level for error messages.
	ERROR = "err"
	// DEBUG represents a log level for debugging messages.
	DEBUG = "debug"
)

Variables

View Source
var (
	// Verbose indicates if additional debug events should be logged.
	Verbose = false
	// ErrLogger holds any errors related to the logger setup or execution.
	ErrLogger error
)

Functions

func DeferFuncForRunLogDriver

func DeferFuncForRunLogDriver()

DeferFuncForRunLogDriver checks and sends logger errors to the system log.

func FlushLog

func FlushLog()

FlushLog only used for Windows file logging.

func SendEventsToLog

func SendEventsToLog(syslogIdentifier string, msg string, msgType string, delay time.Duration)

SendEventsToLog dispatches log messages to the system journal based on the given priority.

func SetLogFilePath

func SetLogFilePath(_, _ string) error

SetLogFilePath only supported on Windows For non-Windows logs will be written to journald.

func StartStackTraceHandler

func StartStackTraceHandler()

StartStackTraceHandler is used when the process catches signals, we will print the stack trace and write to system journal. This function is useful when debugging.

Types

This section is empty.

Jump to

Keyboard shortcuts

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