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

Function ExampleLogger_Rotate

rotate_test.go:13–25  ·  view source on GitHub ↗

Example of how to rotate in response to SIGHUP.

()

Source from the content-addressed store, hash-verified

11
12// Example of how to rotate in response to SIGHUP.
13func ExampleLogger_Rotate() {
14 l := &Logger{}
15 log.SetOutput(l)
16 c := make(chan os.Signal, 1)
17 signal.Notify(c, syscall.SIGHUP)
18
19 go func() {
20 for {
21 <-c
22 l.Rotate()
23 }
24 }()
25}

Callers

nothing calls this directly

Calls 1

RotateMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…