Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/harmonize logger output (#2321)

Thomas Kaulb21884eb66c5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 41241a3363..eaa15507f2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- Harmonized the logger output: <symbol> (<dataSource>)
- Improved the language localization for Dutch (`nl`)
### Fixed
diff --git a/apps/api/src/app/portfolio/portfolio-calculator.ts b/apps/api/src/app/portfolio/portfolio-calculator.ts
index cf6d1b1565..c11e514e4e 100644
--- a/apps/api/src/app/portfolio/portfolio-calculator.ts
+++ b/apps/api/src/app/portfolio/portfolio-calculator.ts
@@ -784,7 +784,7 @@ export class PortfolioCalculator {
);
} else if (!currentPosition.quantity.eq(0)) {
Logger.warn(
- `Missing historical market data for symbol ${currentPosition.symbol}`,
+ `Missing historical market data for ${currentPosition.symbol} (${currentPosition.dataSource})`,
'PortfolioCalculator'
);
hasErrors = true;
diff --git a/apps/api/src/services/data-gathering/data-gathering.service.ts b/apps/api/src/services/data-gathering/data-gathering.service.ts
index 77b79835d7..16ca505de7 100644
--- a/apps/api/src/services/data-gathering/data-gathering.service.ts
+++ b/apps/api/src/services/data-gathering/data-gathering.service.ts
@@ -145,7 +145,9 @@ export class DataGatheringService {
});
} catch (error) {
Logger.error(
- `Failed to enhance data for symbol ${symbol} by ${dataEnhancer.getName()}`,
+ `Failed to enhance data for ${symbol} (${
+ assetProfile.dataSource
+ }) by ${dataEnhancer.getName()}`,
error,
'DataGatheringService'
);