Skip to content

Commit

Permalink
Add log statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZhihao-723 committed Feb 28, 2025
1 parent c0120ec commit 15211e2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion src/clp_ffi_js/ir/StructuredIrUnitHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,17 @@ auto StructuredIrUnitHandler::handle_schema_tree_node_insertion(
return clp::ffi::ir_stream::IRErrorCode::IRErrorCode_Success;
}

auto StructuredIrUnitHandler::handle_end_of_stream() -> clp::ffi::ir_stream::IRErrorCode {
auto StructuredIrUnitHandler::handle_end_of_stream() const -> clp::ffi::ir_stream::IRErrorCode {
if (m_optional_log_level_full_branch.has_value()
&& false == m_optional_log_level_node_id.has_value())
{
SPDLOG_WARN("Log-level filter option is given, but the key is not found in the IR stream.");
}
if (m_optional_timestamp_full_branch.has_value()
&& false == m_optional_timestamp_node_id.has_value())
{
SPDLOG_WARN("Timestamp filter option is given, but the key is not found in the IR stream.");
}
return clp::ffi::ir_stream::IRErrorCode::IRErrorCode_Success;
}

Expand Down
4 changes: 2 additions & 2 deletions src/clp_ffi_js/ir/StructuredIrUnitHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ class StructuredIrUnitHandler {
) -> clp::ffi::ir_stream::IRErrorCode;

/**
* Dummy implementation that does nothing but conforms to the interface.
* Handles end-of-stream IR unit.
* @return IRErrorCode::IRErrorCode_Success
*/
[[nodiscard]] static auto handle_end_of_stream() -> clp::ffi::ir_stream::IRErrorCode;
[[nodiscard]] auto handle_end_of_stream() const -> clp::ffi::ir_stream::IRErrorCode;

private:
// Methods
Expand Down

0 comments on commit 15211e2

Please sign in to comment.