diff --git a/src/services/asset-discovery-service.ts b/src/services/asset-discovery-service.ts index 8c826b29..e6234006 100644 --- a/src/services/asset-discovery-service.ts +++ b/src/services/asset-discovery-service.ts @@ -266,8 +266,8 @@ export class AssetDiscoveryService extends PercyClientService { maybeResources = await Promise.all(maybeResourcePromises) profile('--> assetDiscoveryServer.waitForResourceProcessing') } catch (error) { - logger.error(`${error.name} ${error.message}`) - logger.debug(error) + logger.error(addLogDate(`${error.name} ${error.message}`)) + logger.debug(addLogDate(error)) } // always release the page from the pool diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 71174f76..d3861c61 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -29,8 +29,8 @@ export function profile(id: string, meta?: any): winston.Logger | undefined { } export function logError(error: any) { - logger.error(`${error.name} ${error.message}`) - logger.debug(error) + logger.error(addLogDate(`${error.name} ${error.message}`)) + logger.debug(addLogDate(error)) } export function createFileLogger(filename: string) {