Example of how to rotate in response to SIGHUP.
()
| 11 | |
| 12 | // Example of how to rotate in response to SIGHUP. |
| 13 | func 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…