OptionallevelChange log level, default log level is LogLevel.INFO.
A boolean can be used to let every log pass with true or disable every log with false.
OptionalobserveObserve every log before any level filter or ILog.on handler, without being able to change it: the console and the ILog.on handlers behave as without observer. On the global log, the observer receives logs from every component; otherwise it receives the logs emitted through this logger, including those of the components bound to it.
Logs emitted synchronously while an observer runs are not observed, to prevent recursion.
Intercept, redefine, or redirect any log.
Clearing args intercepts the log, preventing subsequent handlers and console output.
An exception thrown by the handler does not reach the caller: it is rethrown in a microtask,
where it is reported as an uncaught error. Only the first failure of a handler is reported.
Logging interface used throughout the library:
Four LogLevel values are available: 'error', 'warn', 'info', and 'debug', matching the browser console methods. Use ILog.level, ILog.on, and ILog.observe to customize log handling.
Example