subscribe method
Hears each entry as it is recorded.
When the identity changes, the PrincipalLog marker (and anything the new principal's re-mounted queries log before the change is over) arrives after the cache has emptied the previous principal's data, never while it still holds it. A subscriber that reacts to the marker by reading the cache or this inspector therefore sees nothing of the previous principal.
Implementation
void Function() subscribe(void Function(LogEntry entry) listener) =>
_log.subscribe(listener);