Refactors Logger.error to take the Error object

This commit is contained in:
Eric Amodio
2017-03-27 02:15:38 -04:00
parent c500293032
commit e0b3dcd484
31 changed files with 41 additions and 41 deletions

View File

@@ -50,13 +50,13 @@ export class Logger {
}
}
static error(message?: any, ...params: any[]): void {
static error(ex: Error, classOrMethod?: string, ...params: any[]): void {
if (debug) {
console.error(ConsolePrefix, message, ...params);
console.error(ConsolePrefix, ex, ...params);
}
if (level !== OutputLevel.Silent) {
output.appendLine([message, ...params].join(' '));
output.appendLine([ex, ...params].join(' '));
}
}