LogLevel
Last updated on 13-May-2020 by Jakob Jakobsen Boysen
This interface defines the available log levels. The order below defines which log messages are logged:
none // no messages are logged
error // only error messages are logged
warn // warn and error messages are logged
info // info, warn and error messages are logged
debug // debug, info, warn and error messages are logged
Example
Can be used in conjunction with e.g. ScifeonConsoleLogger
:
import { inject } from 'scifeon';
import { ConsoleLogger } from 'scifeon-console-logger';
@inject(ConsoleLogger)
export class CustomPage {
constructor(logger) {
logger.setLevel(logger.logLevel.info);
logger.debug('This message will not be shown, as the log level hides it.');
}
}
API
none
none
No messages are logged.
error
error
Only error messages are logged.
warn
warn
Warn and error messages are logged.
info
info
Info, warn and error messages are logged.
debug
debug
Debug, info, warn and error messages are logged.