logs

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package logs provides interface encapsulation for real-time log display and capture.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logs

type Logs interface {
	// SetOutput sets the terminal for real-time log display.
	SetOutput(show io.Writer) Logs
	// PauseOutput pauses log output.
	PauseOutput()
	// GoOn resumes from pause and continues log output.
	GoOn()
	// EnableStealOne enables or disables log capture copy mode.
	EnableStealOne(bool)
	// StealOne captures log copies in order, returning one at a time; normal indicates whether the logger is closed.
	StealOne() (level int, msg string, normal bool)
	// Close shuts down log output normally.
	Close()
	// Status returns the running status, e.g. 0,"RUN".
	Status() (int, string)
	DelLogger(adapterName string) error
	SetLogger(adapterName string, config map[string]interface{}) error

	// The following methods output logs and, in client/server mode, also send messages over the socket.
	Debug(format string, v ...interface{})
	Informational(format string, v ...interface{})
	App(format string, v ...interface{})
	Notice(format string, v ...interface{})
	Warning(format string, v ...interface{})
	Error(format string, v ...interface{})
	Critical(format string, v ...interface{})
	Alert(format string, v ...interface{})
	Emergency(format string, v ...interface{})
}

Logs defines the logging interface for real-time log display and capture.

func Log

func Log() Logs

Log returns the lazily-initialized default logger. The first call triggers config loading (via config.Conf()) and logger creation.

Directories

Path Synopsis
Package logs provides multi-output logging.
Package logs provides multi-output logging.

Jump to

Keyboard shortcuts

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