build: Use prettier for typescript
Stop ignoring .ts files in prettier and fix existing issues.
This commit is contained in:
@@ -48,7 +48,6 @@ export enum LogLevel {
|
||||
export type LogOutput = (source: string, level: LogLevel, ...objects: any[]) => void;
|
||||
|
||||
export class Logger {
|
||||
|
||||
/**
|
||||
* Current logging level.
|
||||
* Set it to LogLevel.Off to disable logs completely.
|
||||
@@ -68,7 +67,7 @@ export class Logger {
|
||||
Logger.level = LogLevel.Warning;
|
||||
}
|
||||
|
||||
constructor(private source?: string) { }
|
||||
constructor(private source?: string) {}
|
||||
|
||||
/**
|
||||
* Logs messages or objects with the debug level.
|
||||
@@ -106,8 +105,15 @@ export class Logger {
|
||||
if (level <= Logger.level) {
|
||||
const log = this.source ? ['[' + this.source + ']'].concat(objects) : objects;
|
||||
func.apply(console, log);
|
||||
Logger.outputs.forEach((output) => output.apply(output, [this.source, level].concat(objects)));
|
||||
Logger.outputs.forEach((output) =>
|
||||
output.apply(
|
||||
output,
|
||||
[
|
||||
this.source,
|
||||
level
|
||||
].concat(objects)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user