Skip to content

Commit

Permalink
multi thread issue test 10
Browse files Browse the repository at this point in the history
  • Loading branch information
pippocao committed Oct 7, 2024
1 parent 98d489a commit 1ee96be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/bq_log/log/log_imp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ namespace bq {
util::log_device_console(bq::log_level::error, "create_log parse property failed, invalid appenders_config");
return false;
}
flush_appenders_cache();
flush_appenders_io();
for (auto appender_ptr : appenders_list_) {
delete appender_ptr;
}
Expand Down
1 change: 0 additions & 1 deletion test/test_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ namespace bq {
appenders_config.RawAppender.expire_time_days=2
log.thread_mode=sync
log.reliable_level=high
log.categories_mask=[ModuleA.SystemA,ModuleB]
)"
+ snapshot_config);
Expand Down
4 changes: 2 additions & 2 deletions test/test_log_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ namespace bq {
decoder.pick_new_log_file();
result = decoder.get().decode();
}
result_ptr->add_result(result == bq::appender_decode_result::success, "decoder failed");
result_ptr->add_result(result == bq::appender_decode_result::success, "decoder failed, error code:%d", (int32_t)result);
return decoder.get().get_last_decoded_log_entry();
}

Expand All @@ -599,7 +599,7 @@ namespace bq {
decoder.pick_new_log_file();
result = decoder.get().decode();
}
result_ptr->add_result(result == bq::appender_decode_result::success, "decoder failed");
result_ptr->add_result(result == bq::appender_decode_result::success, "decoder failed, error code:%d", (int32_t)result);
return decoder.get().get_last_decoded_log_entry();
}

Expand Down

0 comments on commit 1ee96be

Please sign in to comment.