RotateLogfiles rotates all active log files.
(ctx context.Context)
| 98 | |
| 99 | // RotateLogfiles rotates all active log files. |
| 100 | func RotateLogfiles(ctx context.Context) { |
| 101 | InfofCtx(ctx, KeyAll, "Rotating log files...") |
| 102 | |
| 103 | for _, logger := range getFileLoggers() { |
| 104 | err := logger.Rotate() |
| 105 | if err != nil { |
| 106 | WarnfCtx(ctx, "Error rotating %v: %v", logger, err) |
| 107 | } |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | func init() { |
| 112 | initializeLoggers(context.Background()) |
no test coverage detected