MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / Logger

Class Logger

packages/alphatab/src/Logger.ts:43–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 * @public
42 */
43export class Logger {
44 public static logLevel: LogLevel = LogLevel.Info;
45 public static log: ILogger = new ConsoleLogger();
46
47 private static _shouldLog(level: LogLevel): boolean {
48 return Logger.logLevel !== LogLevel.None && level >= Logger.logLevel;
49 }
50
51 public static debug(category: string, msg: string, ...details: unknown[]): void {
52 if (Logger._shouldLog(LogLevel.Debug)) {
53 Logger.log.debug(category, msg, ...details);
54 }
55 }
56
57 public static warning(category: string, msg: string, ...details: unknown[]): void {
58 if (Logger._shouldLog(LogLevel.Warning)) {
59 Logger.log.warning(category, msg, ...details);
60 }
61 }
62
63 public static info(category: string, msg: string, ...details: unknown[]): void {
64 if (Logger._shouldLog(LogLevel.Info)) {
65 Logger.log.info(category, msg, ...details);
66 }
67 }
68
69 public static error(category: string, msg: string, ...details: unknown[]): void {
70 if (Logger._shouldLog(LogLevel.Error)) {
71 Logger.log.error(category, msg, ...details);
72 }
73 }
74}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected