From 7586d3324ce3d389ea0b281bafb5a2b2c2312cd6 Mon Sep 17 00:00:00 2001 From: Matthew-Supernaw-NOAA Date: Fri, 3 May 2024 14:22:01 -0400 Subject: [PATCH] fixed GetLogModule function --- inst/include/common/fims_log.hpp | 2 +- test/test.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/include/common/fims_log.hpp b/inst/include/common/fims_log.hpp index 5c70735..d625f00 100644 --- a/inst/include/common/fims_log.hpp +++ b/inst/include/common/fims_log.hpp @@ -292,7 +292,7 @@ class FIMSLog { std::stringstream ss; std::vector info; for (size_t i = 0; i < log_entries.size(); i++) { - if (log_entries[i].file == module) { + if (log_entries[i].file.find(module) != std::string::npos) { info.push_back(this->log_entries[i]); } } diff --git a/test/test.R b/test/test.R index 011aa05..b6b60f0 100644 --- a/test/test.R +++ b/test/test.R @@ -86,7 +86,7 @@ print(rep$gradient.fixed) cat(g$GetLog()) -fims_log<-fromJSON(g$GetLog(),simplifyVector = FALSE) +fims_log<-fromJSON(g$GetLogModule("rcpp_interface") ,simplifyVector = FALSE) for(i in 1:length(fims_log)){ print(fims_log[[i]]) }