CurrentScope reports the scope currently in effect (last value passed to RotateForScope), or "" if no rotation has happened.
()
| 596 | // CurrentScope reports the scope currently in effect (last value |
| 597 | // passed to RotateForScope), or "" if no rotation has happened. |
| 598 | func (s *DebugFileSink) CurrentScope() string { |
| 599 | if s == nil { |
| 600 | return "" |
| 601 | } |
| 602 | s.mu.Lock() |
| 603 | defer s.mu.Unlock() |
| 604 | return s.currentScope |
| 605 | } |
| 606 | |
| 607 | // globalSinkHolder lets atomic.Value store the same concrete type for |
| 608 | // the package-wide debug file sink (atomic.Value panics on type |
no outgoing calls