Archived
1
0

refactor: use LogModule from Asher in tests

This commit is contained in:
Joe Previte
2021-02-23 12:30:48 -07:00
parent a44a51462c
commit 027e8e5adf
2 changed files with 19 additions and 21 deletions

View File

@ -114,12 +114,9 @@ export const getFirstString = (value: string | string[] | object | undefined): s
}
export function logError(prefix: string, err: any): void {
console.log("hey joe log error was called")
if (err instanceof Error) {
console.log("it was an instance of error")
logger.error(`${prefix}: ${err.message} ${err.stack}`)
} else {
console.log("not an isntance errro")
logger.error(`${prefix}: ${err}`)
}
}