MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / RotateLogfiles

Function RotateLogfiles

base/logging.go:100–109  ·  view source on GitHub ↗

RotateLogfiles rotates all active log files.

(ctx context.Context)

Source from the content-addressed store, hash-verified

98
99// RotateLogfiles rotates all active log files.
100func 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
111func init() {
112 initializeLoggers(context.Background())

Callers 1

HandleSighupFunction · 0.92

Calls 4

getFileLoggersFunction · 0.85
WarnfCtxFunction · 0.85
RotateMethod · 0.80
InfofCtxFunction · 0.70

Tested by

no test coverage detected