From 0ff9de754570e8d6ed0adb79ed9fa826f3c1905a Mon Sep 17 00:00:00 2001 From: panda-sheep <59197347+panda-sheep@users.noreply.github.com> Date: Tue, 6 Dec 2022 10:38:17 +0800 Subject: [PATCH] fix no print to console --- src/common/fs/FileUtils.cpp | 5 +---- src/daemons/MetaDaemon.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/common/fs/FileUtils.cpp b/src/common/fs/FileUtils.cpp index b1183d25055..196d60ab000 100644 --- a/src/common/fs/FileUtils.cpp +++ b/src/common/fs/FileUtils.cpp @@ -158,12 +158,9 @@ FileType FileUtils::fileType(const char* path) { struct stat st; if (lstat(path, &st)) { if (errno == ENOENT) { - VLOG(3) << "The path \"" << path << "\" does not exist"; return FileType::NOTEXIST; } else { - // Failed o get file stat - VLOG(3) << "Failed to get information about \"" << path << "\" (" << errno - << "): " << strerror(errno); + // Failed to get file stat return FileType::UNKNOWN; } } diff --git a/src/daemons/MetaDaemon.cpp b/src/daemons/MetaDaemon.cpp index 0fa5f7ebafc..4fb06dc4860 100644 --- a/src/daemons/MetaDaemon.cpp +++ b/src/daemons/MetaDaemon.cpp @@ -79,10 +79,6 @@ int main(int argc, char* argv[]) { if (FLAGS_enable_ssl || FLAGS_enable_meta_ssl) { folly::ssl::init(); } - if (FLAGS_data_path.empty()) { - LOG(ERROR) << "Meta Data Path should not empty"; - return EXIT_FAILURE; - } // Setup logging status = setupLogging(argv[0]); @@ -105,6 +101,11 @@ int main(int argc, char* argv[]) { } #endif + if (FLAGS_data_path.empty()) { + LOG(ERROR) << "Meta Data Path should not empty"; + return EXIT_FAILURE; + } + // Init stats nebula::initMetaStats();