logging

package
v1.0.44 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatLogSourcePrefix added in v1.0.44

func FormatLogSourcePrefix(source string) string

FormatLogSourcePrefix renders a fixed-width log source column.

func GetRequestID

func GetRequestID(ctx context.Context) string

GetRequestID retrieves the request ID from the context. Returns empty string if not found.

func SetupBaseLogger

func SetupBaseLogger()

SetupBaseLogger configures the shared logrus instance. It is safe to call multiple times; initialization happens only once.

Types

type LogFormatter

type LogFormatter struct{}

LogFormatter defines a custom log format for logrus. This formatter adds source, timestamp, level, request ID, and source location to each log entry. Format: [CLIProxyAPIHome] [2025-12-23 20:14:04] [debug] [manager.go:524] | a1b2c3d4 | Use API key sk-9...0RHO for model gpt-5.2

func (*LogFormatter) Format

func (m *LogFormatter) Format(entry *log.Entry) ([]byte, error)

Format renders a single log entry with custom formatting.

Jump to

Keyboard shortcuts

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