forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogger.ts
More file actions
48 lines (39 loc) · 967 Bytes
/
logger.ts
File metadata and controls
48 lines (39 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { getLogger } from '@alilc/lowcode-utils';
import { IPublicApiLogger, ILoggerOptions } from '@alilc/lowcode-types';
const innerLoggerSymbol = Symbol('logger');
export class Logger implements IPublicApiLogger {
private readonly [innerLoggerSymbol]: any;
constructor(options: ILoggerOptions) {
this[innerLoggerSymbol] = getLogger(options as any);
}
/**
* debug info
*/
debug(...args: any | any[]): void {
this[innerLoggerSymbol].debug(...args);
}
/**
* normal info output
*/
info(...args: any | any[]): void {
this[innerLoggerSymbol].info(...args);
}
/**
* warning info output
*/
warn(...args: any | any[]): void {
this[innerLoggerSymbol].warn(...args);
}
/**
* error info output
*/
error(...args: any | any[]): void {
this[innerLoggerSymbol].error(...args);
}
/**
* normal log output
*/
log(...args: any | any[]): void {
this[innerLoggerSymbol].log(...args);
}
}