logutil

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultLogFile = "/tmp/llm-proxy.log"

DefaultLogFile is the full-log destination used when --log is not passed.

View Source
const LogOff = "off"

LogOff is the --log value that disables file logging entirely.

Variables

This section is empty.

Functions

func ExpandPath

func ExpandPath(path string) (string, error)

func LogHeaders

func LogHeaders(headers http.Header, logf func(format string, args ...any))

func RedactHeaderValue

func RedactHeaderValue(key string, values []string) string

func ResolveLogFile added in v0.0.12

func ResolveLogFile(flagValue string) (path string, defaulted bool)

ResolveLogFile maps the --log flag value to the file to open. It returns the resolved path and whether the default was applied (so the caller can print a notice). A false resolved value means no file logging.

Types

type Logger

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

func New

func New(w io.Writer) *Logger

func OpenAppend

func OpenAppend(path string) (*Logger, io.Closer, error)

OpenAppend opens an hourly-rotated log. The requested path is maintained as a symlink to the current hourly segment.

func (*Logger) LogHeaders

func (l *Logger) LogHeaders(headers http.Header)

func (*Logger) Printf

func (l *Logger) Printf(format string, args ...any)

Jump to

Keyboard shortcuts

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