MCPcopy Create free account
hub / github.com/compozy/agh / WithFile

Function WithFile

internal/logger/logger.go:48–52  ·  view source on GitHub ↗

WithFile enables JSON log output to the supplied file path.

(path string)

Source from the content-addressed store, hash-verified

46
47// WithFile enables JSON log output to the supplied file path.
48func WithFile(path string) Option {
49 return func(opts *options) {
50 opts.filePath = path
51 }
52}
53
54// WithFileRotation enables lumberjack-backed rotation for the structured file sink.
55func WithFileRotation(rotation FileRotationConfig) Option {

Callers 4

BenchmarkNewFileOnlyFunction · 0.85
BenchmarkLogFileOnlyFunction · 0.85
TestNewWithFileRotationFunction · 0.85

Calls

no outgoing calls

Tested by 4

BenchmarkNewFileOnlyFunction · 0.68
BenchmarkLogFileOnlyFunction · 0.68
TestNewWithFileRotationFunction · 0.68