diff --git a/src/bq_log/log/log_imp.cpp b/src/bq_log/log/log_imp.cpp index aa40393..bc44cd9 100644 --- a/src/bq_log/log/log_imp.cpp +++ b/src/bq_log/log/log_imp.cpp @@ -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; } diff --git a/test/test_log.h b/test/test_log.h index 2a308b4..60d5f0d 100644 --- a/test/test_log.h +++ b/test/test_log.h @@ -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); diff --git a/test/test_log_3.cpp b/test/test_log_3.cpp index 1b5a841..ae517e1 100644 --- a/test/test_log_3.cpp +++ b/test/test_log_3.cpp @@ -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(); } @@ -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(); }