Skip to content
Snippets Groups Projects
Commit 5e12d336 authored by jojohoch's avatar jojohoch
Browse files

[player] Set log level to 1 and rename enum LogLevel

- Disable explicit any rule, because here the native interface of
'window.console' uses 'any[]'
parent 7244eaa8
No related branches found
No related tags found
No related merge requests found
......@@ -8,24 +8,28 @@ export enum LogLevel { LOG = 0, INFO = 1, WARN = 2, ERROR = 3, NONE = 4}
export class LogService {
static level: LogLevel = 1;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
static error(...args: any[]): void {
if (LogService.level >= LogLevel.ERROR) {
window.console.error.apply( console, args );
}
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
static warn(...args: any[]): void {
if (LogService.level >= LogLevel.WARN) {
window.console.warn.apply( console, args );
}
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
static info(...args: any[]): void {
if (LogService.level >= LogLevel.INFO) {
window.console.info.apply( console, args );
}
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
static log(...args: any[]): void {
if (LogService.level >= LogLevel.LOG) {
window.console.info.apply( console, args );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment