Skip to content

Commit

Permalink
more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
davemarco committed Oct 2, 2024
1 parent d878399 commit d2e3d1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/clp_ffi_js/ir/LogViewerEvent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ template <typename encoded_variable_t>
auto LogViewerEvent<encoded_variable_t>::get_log_level() const -> size_t {
return m_log_level;
}

} // namespace clp_ffi_js::ir

#endif // CLP_FFI_JS_IR_LOG_VIEWER_EVENT_HPP
11 changes: 8 additions & 3 deletions src/clp_ffi_js/ir/StreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ auto StreamReader::build() -> size_t {
log_level = std::distance(cLogLevelNames.begin(), log_level_name_it);
}

const auto log_viewer_event = LogViewerEvent<four_byte_encoded_variable_t>(log_event.get_timestamp(), log_event.get_utc_offset(), message, log_level);
const auto log_viewer_event = LogViewerEvent<four_byte_encoded_variable_t>(
log_event.get_timestamp(),
log_event.get_utc_offset(),
message,
log_level
);

m_encoded_log_events.emplace_back(std::move(log_viewer_event));
continue;
Expand Down Expand Up @@ -230,7 +235,7 @@ void StreamReader::filter_log_events(const emscripten::val& logLevelFilter) {

m_filtered_log_event_map.emplace();
std::vector<int> filter_levels = emscripten::vecFromJSArray<int>(logLevelFilter);
// Filter log events based on the provided log levels

for (size_t index = 0; index < m_encoded_log_events.size(); ++index) {
const auto& logEvent = m_encoded_log_events[index];
if (std::find(filter_levels.begin(), filter_levels.end(), logEvent.get_log_level()) != filter_levels.end()) {
Expand All @@ -246,7 +251,7 @@ StreamReader::StreamReader(
StreamReaderDataContext<four_byte_encoded_variable_t>>(
std::move(stream_reader_data_context)
)},
m_ts_pattern{m_stream_reader_data_context->get_deserializer().get_timestamp_pattern()} {}
m_ts_pattern{m_stream_reader_data_context->get_deserializer().get_timestamp_pattern()} {}
} // namespace clp_ffi_js::ir

namespace {
Expand Down

0 comments on commit d2e3d1d

Please sign in to comment.