Skip to content

Commit 8b3b754

Browse files
authored
refactor: replace boost::filesystem with std::filesystem in glog_wrapper (#4112)
1 parent 1d5edd3 commit 8b3b754

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/base/glog_wrapper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
#define SRC_BASE_GLOG_WRAPPER_H_
1919

2020
#include <cstdarg>
21+
#include <filesystem>
2122
#include <iostream>
2223
#include <mutex>
2324
#include <string>
2425

25-
#include "boost/filesystem.hpp"
2626
#include "boost/format.hpp"
2727
#include "gflags/gflags.h"
2828
#include "glog/logging.h"
@@ -80,7 +80,7 @@ inline void UnprotectedSetupGlog(bool origin_flags = false) {
8080
FLAGS_logtostderr = true;
8181
::google::InitGoogleLogging(role.c_str());
8282
} else {
83-
boost::filesystem::create_directories(log_dir);
83+
std::filesystem::create_directories(log_dir);
8484
std::string path = log_dir + "/" + role;
8585
::google::InitGoogleLogging(path.c_str());
8686
std::string info_log_path = path + ".info.log.";

src/base/glog_wrapper_test.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "base/glog_wrapper.h"
1818

19+
#include <filesystem>
1920
#include <iostream>
2021
#include <string>
2122

@@ -24,7 +25,7 @@
2425
namespace openmldb {
2526
namespace base {
2627

27-
namespace fs = boost::filesystem;
28+
namespace fs = std::filesystem;
2829

2930
class GlogWrapperTest : public ::testing::Test {
3031
public:

0 commit comments

Comments
 (0)