This is an automated email from the ASF dual-hosted git repository.

wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/master by this push:
     new e9537a64e fix: fix log header not corresponding to level (#1246)
e9537a64e is described below

commit e9537a64e6fb5b2fd799943d4a58327c2b6905f1
Author: Yingchun Lai <[email protected]>
AuthorDate: Thu Nov 17 21:35:40 2022 +0800

    fix: fix log header not corresponding to level (#1246)
---
 src/utils/simple_logger.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/utils/simple_logger.cpp b/src/utils/simple_logger.cpp
index 1a91c97d5..dfb86eada 100644
--- a/src/utils/simple_logger.cpp
+++ b/src/utils/simple_logger.cpp
@@ -56,7 +56,13 @@ DSN_DEFINE_validator(stderr_start_level, [](const char 
*level) -> bool {
 
 static void print_header(FILE *fp, dsn_log_level_t log_level)
 {
-    static char s_level_char[] = "IDWEF";
+    // The leading character of each log lines, corresponding to the log level
+    // D: Debug
+    // I: Info
+    // W: Warning
+    // E: Error
+    // F: Fatal
+    static char s_level_char[] = "DIWEF";
 
     uint64_t ts = dsn_now_ns();
     std::string time_str;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to