MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / NewFileLogger

Function NewFileLogger

internal/logger/logger.go:153–161  ·  view source on GitHub ↗

NewFileLogger creates a logger that outputs to a file with the given level.

(level Level, logFile string)

Source from the content-addressed store, hash-verified

151
152// NewFileLogger creates a logger that outputs to a file with the given level.
153func NewFileLogger(level Level, logFile string) (*Logger, error) {
154 config := &Config{
155 Level: level,
156 LogToFile: true,
157 LogFile: logFile,
158 }
159
160 return NewLogger(config)
161}
162
163// NewDualLogger creates a logger that outputs to both stdout and a file.
164func NewDualLogger(level Level, logFile string) (*Logger, error) {

Callers 3

TestNewFileLoggerFunction · 0.85
TestLogger_CloseFunction · 0.85

Calls 1

NewLoggerFunction · 0.85

Tested by 3

TestNewFileLoggerFunction · 0.68
TestLogger_CloseFunction · 0.68