currentLogger top-level property
RequestLogger
currentLogger
Returns the current RequestLogger.
If called within cloudLoggingMiddleware, the returned RequestLogger will create output that conforms with structured logs.
Otherwise, the returned RequestLogger will simply print log entries, with entries having a LogSeverity different than LogSeverity.defaultSeverity being prefixed as such.
Implementation
RequestLogger get currentLogger =>
Zone.current[_loggerKey] as RequestLogger? ?? const _DefaultLogger();