TrackerWithLogger sets the logger to be used by Tracker.
(log slog.Logger)
| 70 | |
| 71 | // TrackerWithLogger sets the logger to be used by Tracker. |
| 72 | func TrackerWithLogger(log slog.Logger) TrackerOption { |
| 73 | return func(h *UsageTracker) { |
| 74 | h.log = log |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | // TrackerWithFlushInterval allows configuring the flush interval of Tracker. |
| 79 | func TrackerWithFlushInterval(d time.Duration) TrackerOption { |
no outgoing calls