This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 30b73576041 [improve](logging) make glog FLAGS_v configurable (#29182)
30b73576041 is described below
commit 30b73576041d2714503a777d2a5b09efad93a020
Author: Kaijie Chen <[email protected]>
AuthorDate: Sat Dec 30 12:47:47 2023 +0800
[improve](logging) make glog FLAGS_v configurable (#29182)
---
be/src/common/config.cpp | 2 ++
be/src/common/config.h | 2 ++
be/src/common/logconfig.cpp | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp
index 785aab61c97..e94b4c6dadb 100644
--- a/be/src/common/config.cpp
+++ b/be/src/common/config.cpp
@@ -208,6 +208,8 @@ DEFINE_Int32(sys_log_roll_num, "10");
DEFINE_Strings(sys_log_verbose_modules, "");
// verbose log level
DEFINE_Int32(sys_log_verbose_level, "10");
+// verbose log FLAGS_v
+DEFINE_Int32(sys_log_verbose_flags_v, "-1");
// log buffer level
DEFINE_String(log_buffer_level, "");
diff --git a/be/src/common/config.h b/be/src/common/config.h
index 1cbfbffb4cb..2d257b49510 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -256,6 +256,8 @@ DECLARE_Int32(sys_log_roll_num);
DECLARE_Strings(sys_log_verbose_modules);
// verbose log level
DECLARE_Int32(sys_log_verbose_level);
+// verbose log FLAGS_v
+DECLARE_Int32(sys_log_verbose_flags_v);
// log buffer level
DECLARE_String(log_buffer_level);
diff --git a/be/src/common/logconfig.cpp b/be/src/common/logconfig.cpp
index 1c53035317a..bae037066ae 100644
--- a/be/src/common/logconfig.cpp
+++ b/be/src/common/logconfig.cpp
@@ -130,7 +130,7 @@ bool init_glog(const char* basename) {
}
// set verbose modules.
- FLAGS_v = -1;
+ FLAGS_v = config::sys_log_verbose_flags_v;
std::vector<std::string>& verbose_modules =
config::sys_log_verbose_modules;
int32_t vlog_level = config::sys_log_verbose_level;
for (size_t i = 0; i < verbose_modules.size(); i++) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]