Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed May 24, 2024
1 parent 882fc1a commit 0a28a20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/runtime/tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void tracer::install(service_spec &spec)
"tracer.find",
"Find related logs",
"[forward|f|backward|b] [rpc|r|task|t] [trace_id|task_id(e.g., a023003920302390)] "
"<log_file_name(e.g., log.xx.txt)>",
"<log_file_name(e.g., log.yyyyMMdd_hhmmss_SSS)>",
tracer_log_flow);
});
}
Expand Down
3 changes: 2 additions & 1 deletion src/utils/simple_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@

#include "utils/simple_logger.h"

#include <cstdint>
#include <errno.h>
// IWYU pragma: no_include <ext/alloc_traits.h>
#include <fmt/core.h>
#include <fmt/printf.h>
#include <sys/stat.h>
#include <unistd.h>
#include <algorithm>
#include <cstdint>
#include <ctime>
#include <functional>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/test/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class simple_logger_test : public logger_test
ASSERT_TRUE(utils::filesystem::get_subfiles(test_dir, sub_list, false));

file_names.clear();
std::regex pattern(R"(log\.log\.[0-9]{8}_[0-9]{6}_[0-9]{3})");
std::regex pattern(R"(log\.[0-9]{8}_[0-9]{6}_[0-9]{3})");
for (const auto &path : sub_list) {
std::string name(utils::filesystem::get_file_name(path));
if (std::regex_match(name, pattern)) {
Expand Down

0 comments on commit 0a28a20

Please sign in to comment.