@@ -78,9 +78,10 @@ void XvaAnalyticImpl::checkConfigurations(const boost::shared_ptr<Portfolio>& p
7878 Period mpor_simulation = analytic ()->configurations ().scenarioGeneratorData ->closeOutLag ();
7979 Period mpor_netting = inputs_->nettingSetManager ()->get (key)->csaDetails ()->marginPeriodOfRisk ();
8080 if (mpor_simulation != mpor_netting)
81- WLOG ( StructuredAnalyticsWarningMessage (
81+ StructuredAnalyticsWarningMessage (
8282 " XvaAnalytic" , " Inconsistent MPoR period" ,
83- " For netting set " + key +" , close-out lag is not consistent with the netting-set's mpor " ));
83+ " For netting set " + key + " , close-out lag is not consistent with the netting-set's mpor " )
84+ .log ();
8485 }
8586 }
8687 }
@@ -425,7 +426,7 @@ void XvaAnalyticImpl::buildAmcPortfolio() {
425426 amcPortfolio_->add (trade);
426427 DLOG (" trade " << tradeId << " is added to amc portfolio" );
427428 } catch (const std::exception& e) {
428- ALOG ( StructuredTradeErrorMessage (trade, " Error building trade for AMC simulation" , e.what ()));
429+ StructuredTradeErrorMessage (trade, " Error building trade for AMC simulation" , e.what ()). log ( );
429430 }
430431 }
431432 }
@@ -773,8 +774,9 @@ void XvaAnalyticImpl::runAnalytic(const boost::shared_ptr<ore::data::InMemoryLoa
773774 ReportWriter (inputs_->reportNaString ()).writeTradeExposures (*report, postProcess_, tradeId);
774775 analytic ()->reports ()[" XVA" ][" exposure_trade_" + tradeId] = report;
775776 } catch (const std::exception& e) {
776- ALOG (StructuredAnalyticsErrorMessage (" Trade Exposure Report" , " Error processing trade." , e.what (),
777- {{" tradeId" , tradeId}}));
777+ StructuredAnalyticsErrorMessage (" Trade Exposure Report" , " Error processing trade." , e.what (),
778+ {{" tradeId" , tradeId}})
779+ .log ();
778780 }
779781 }
780782 }
@@ -787,8 +789,9 @@ void XvaAnalyticImpl::runAnalytic(const boost::shared_ptr<ore::data::InMemoryLoa
787789 .writeNettingSetExposures (*exposureReport, postProcess_, nettingSet);
788790 analytic ()->reports ()[" XVA" ][" exposure_nettingset_" + nettingSet] = exposureReport;
789791 } catch (const std::exception& e) {
790- ALOG (StructuredAnalyticsErrorMessage (" Netting Set Exposure Report" , " Error processing netting set." ,
791- e.what (), {{" nettingSetId" , nettingSet}}));
792+ StructuredAnalyticsErrorMessage (" Netting Set Exposure Report" , " Error processing netting set." ,
793+ e.what (), {{" nettingSetId" , nettingSet}})
794+ .log ();
792795 }
793796
794797 auto colvaReport = boost::make_shared<InMemoryReport>();
@@ -797,8 +800,9 @@ void XvaAnalyticImpl::runAnalytic(const boost::shared_ptr<ore::data::InMemoryLoa
797800 .writeNettingSetColva (*colvaReport, postProcess_, nettingSet);
798801 analytic ()->reports ()[" XVA" ][" colva_nettingset_" + nettingSet] = colvaReport;
799802 } catch (const std::exception& e) {
800- ALOG (StructuredAnalyticsErrorMessage (" Netting Set Colva Report" , " Error processing netting set." ,
801- e.what (), {{" nettingSetId" , nettingSet}}));
803+ StructuredAnalyticsErrorMessage (" Netting Set Colva Report" , " Error processing netting set." ,
804+ e.what (), {{" nettingSetId" , nettingSet}})
805+ .log ();
802806 }
803807
804808 auto cvaSensiReport = boost::make_shared<InMemoryReport>();
@@ -807,8 +811,9 @@ void XvaAnalyticImpl::runAnalytic(const boost::shared_ptr<ore::data::InMemoryLoa
807811 .writeNettingSetCvaSensitivities (*cvaSensiReport, postProcess_, nettingSet);
808812 analytic ()->reports ()[" XVA" ][" cva_sensitivity_nettingset_" + nettingSet] = cvaSensiReport;
809813 } catch (const std::exception& e) {
810- ALOG (StructuredAnalyticsErrorMessage (" Cva Sensi Report" , " Error processing netting set." , e.what (),
811- {{" nettingSetId" , nettingSet}}));
814+ StructuredAnalyticsErrorMessage (" Cva Sensi Report" , " Error processing netting set." , e.what (),
815+ {{" nettingSetId" , nettingSet}})
816+ .log ();
812817 }
813818 }
814819 }
0 commit comments