added more detail missing security log in gmdl

This commit is contained in:
arham committed 2026-10-26 03:32:49 +00:00
1 parent edf8adb90e
commit 1f94fe65bc
2 files changed
+26 -7

No files matched your search

@@ -556,7 +556,7 @@ void GeneralMarketDataListener::on_trades(
aggressor_side = try_fill_agg_side(tp->trade_price, aggressor_side, bk);
const auto &sec = handle->handle.security();
LOG_TRADE_RECORD(
Info, t, sec.exchange, sec.type, sec.security_desc(),
Diag, t, sec.exchange, sec.type, sec.security_desc(),
TradeRecordLog_Status::PROCESSING);
const auto trade_ts = tp->time_stamp.to_ll();
@@ -842,7 +842,20 @@ void GeneralMarketDataListener::_on_book(
me->n_bk_updates++;
auto handle = _find_handle(book.security_id());
if (handle == nullptr) {
LOG_BOOK(Error, book, BookLog_Status::ABORTED, "Sec handle not found");
const auto mapping = me->cc_sec_id_map.find(book.security_id());
const bool mapped = mapping != me->cc_sec_id_map.end();
LOG_BOOK(
Error, book, domain::DomainSecurityUtils::convert(me->venue),
api::SECURITYTYPE_UNSET, "", BookLog_Status::ABORTED,
fmt::format(
"Sec handle not found; reason={}; mapped_spark_key={}; "
"key_mode={}; registered_mappings={}; deferred_spreads={}; "
"simulation={}",
mapped ? "mapped_key_missing_from_index" : "source_id_not_mapped",
mapped ? std::to_string(mapping->second) : "unmapped",
me->use_given_sec_key ? "source_key" : "persisted_spark_key",
me->cc_sec_id_map.size(), me->deferred_spreads.size(),
me->sim_ex_gwy != nullptr));
return;
}
copy_books(book, me->bids, bts::domain::Side::Value::Buy);
+11 -5
View File
@@ -42,15 +42,21 @@ struct BookLog {
api::Venue venue,
api::SecurityType sec_type,
std::string sec_name,
BookLog_Status status)
BookLog_Status status,
std::string message = "")
: book(std::move(book)), venue(venue), sec_type(sec_type),
sec_name(std::move(sec_name)), status(status), message(),
timestamp(core::TimeStamp::now()) {}
sec_name(std::move(sec_name)), status(status),
message(std::move(message)), timestamp(core::TimeStamp::now()) {}
explicit BookLog(
domain::Book book, BookLog_Status status, std::string message)
: book(std::move(book)), status(status), message(std::move(message)),
timestamp(core::TimeStamp::now()) {}
: BookLog(
std::move(book),
api::VENUE_UNSET,
api::SECURITYTYPE_UNSET,
"",
status,
std::move(message)) {}
};
} // namespace bts::md