website refactor
This commit is contained in:
@@ -53,20 +53,24 @@ interface MigrationResult {
|
||||
}
|
||||
|
||||
class MediaMigrationLogger implements Logger {
|
||||
private getTimestamp(): string {
|
||||
return new Date().toISOString();
|
||||
}
|
||||
|
||||
info(message: string): void {
|
||||
console.log(`[INFO] ${message}`);
|
||||
console.log(`[${this.getTimestamp()}] [INFO] ${message}`);
|
||||
}
|
||||
|
||||
warn(message: string): void {
|
||||
console.warn(`[WARN] ${message}`);
|
||||
console.warn(`[${this.getTimestamp()}] [WARN] ${message}`);
|
||||
}
|
||||
|
||||
error(message: string, trace?: string): void {
|
||||
console.error(`[ERROR] ${message}`, trace || '');
|
||||
console.error(`[${this.getTimestamp()}] [ERROR] ${message}`, trace || '');
|
||||
}
|
||||
|
||||
debug(message: string): void {
|
||||
console.debug(`[DEBUG] ${message}`);
|
||||
console.debug(`[${this.getTimestamp()}] [DEBUG] ${message}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user