MCPcopy
hub / github.com/natefinch/lumberjack / filename

Method filename

lumberjack.go:292–298  ·  view source on GitHub ↗

filename generates the name of the logfile from the current time.

()

Source from the content-addressed store, hash-verified

290
291// filename generates the name of the logfile from the current time.
292func (l *Logger) filename() string {
293 if l.Filename != "" {
294 return l.Filename
295 }
296 name := filepath.Base(os.Args[0]) + "-lumberjack.log"
297 return filepath.Join(os.TempDir(), name)
298}
299
300// millRunOnce performs compression and removal of stale log files.
301// Log files are compressed if enabled via configuration and old log

Callers 4

openNewMethod · 0.95
openExistingOrNewMethod · 0.95
dirMethod · 0.95
prefixAndExtMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected