SetSink registers a callback fired on each Record. The TUI uses it to nudge a re-render of the debug panel. Pass nil to unregister.
(f func(Event))
| 74 | // SetSink registers a callback fired on each Record. The TUI uses it to nudge |
| 75 | // a re-render of the debug panel. Pass nil to unregister. |
| 76 | func SetSink(f func(Event)) { |
| 77 | mu.Lock() |
| 78 | sink = f |
| 79 | mu.Unlock() |
| 80 | } |
| 81 | |
| 82 | // Record appends a payload-less event and returns its ID (0 if disabled). |
| 83 | func Record(source string, level Level, message string) uint64 { |
no outgoing calls