- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for FileNameFunc (0.07 sec)
-
internal/logger/logrotate.go
MaximumFileSize int64 // FileNameFunc specifies the name a new file will take. // FileNameFunc must ensure collisions in filenames do not occur. // Do not rely on timestamps to be unique, high throughput writes // may fall on the same timestamp. // Eg. // 2020-03-28_15-00-945-<random-hash>.log // When FileNameFunc is not specified, DefaultFilenameFunc will be used. FileNameFunc func() string
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 5.8K bytes - Viewed (0) -
cmd/server-main.go
if lgDir == "" { return os.Stderr, nil } lgDirAbs, err := filepath.Abs(lgDir) if err != nil { return nil, err } lgSize := ctx.Int("log-size") var fileNameFunc func() string if ctx.IsSet("log-prefix") { fileNameFunc = func() string { return fmt.Sprintf("%s-%s.log", ctx.String("log-prefix"), fmt.Sprintf("%X", time.Now().UTC().UnixNano())) } } output, err := logger.NewDir(logger.Options{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 21:50:11 UTC 2024 - 35.2K bytes - Viewed (1)