Skip to content

Commit 4f37de0

Browse files
committed
Fix McrouterLogger for OSS
facebook/mcrouter#474
1 parent 6649f42 commit 4f37de0

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

third-party/mcrouter/mcrouter-CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ list(APPEND CXX_SOURCES ${files})
8686
add_definitions(-DNO_LIB_GFLAGS)
8787
add_definitions(-DLIBMC_FBTRACE_DISABLE)
8888
add_definitions(-DHAVE_CONFIG_H)
89+
add_definitions(-DMCROUTER_OSS_BUILD)
8990

9091
include_directories("${CMAKE_SOURCE_DIR}")
9192
include_directories("${CMAKE_BINARY_DIR}")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/home/catullus/data/hhvm/third-party/mcrouter/mcrouter-CMakeLists.txt

third-party/mcrouter/src/mcrouter/McrouterLogger.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ bool McrouterLogger::start() {
162162
} else {
163163
// If default path is not available and TW backup is enabled, try backup
164164
// path
165+
#ifndef MCROUTER_OSS_BUILD
165166
if (router_.opts().enable_tw_crash_config_backup_path &&
166167
additionalLogger_) {
167168
auto backupPath = additionalLogger_->getBackupStatsRootPath();
@@ -181,6 +182,11 @@ bool McrouterLogger::start() {
181182
<< ", disabling stats logging";
182183
return false;
183184
}
185+
#else
186+
LOG(WARNING) << "Can't create or chmod " << router_.opts().stats_root
187+
<< ", disabling stats logging";
188+
return false;
189+
#endif
184190
}
185191

186192
boost::filesystem::path path(statsRoot_);

0 commit comments

Comments
 (0)