From 638956aa81de255bf4bbd4e69a717eabf4ceadb9 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Mon, 2 Jul 2018 10:13:26 -0600 Subject: Rename logging macro back to LOG_* --- src/common/logging/filter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common/logging/filter.cpp') diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index 428723dce..fdfb66696 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp @@ -65,14 +65,14 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin, const std::string::const_iterator end) { auto level_separator = std::find(begin, end, ':'); if (level_separator == end) { - NGLOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: %s", + LOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: %s", std::string(begin, end).c_str()); return false; } const Level level = GetLevelByName(level_separator + 1, end); if (level == Level::Count) { - NGLOG_ERROR(Log, "Unknown log level in filter: %s", std::string(begin, end).c_str()); + LOG_ERROR(Log, "Unknown log level in filter: %s", std::string(begin, end).c_str()); return false; } @@ -83,7 +83,7 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin, const Class log_class = GetClassByName(begin, level_separator); if (log_class == Class::Count) { - NGLOG_ERROR(Log, "Unknown log class in filter: %s", std::string(begin, end).c_str()); + LOG_ERROR(Log, "Unknown log class in filter: %s", std::string(begin, end).c_str()); return false; } -- cgit v1.2.3 From 0d46f0df122dbc9b9a9d9f97e2da6b1953ef939b Mon Sep 17 00:00:00 2001 From: James Rowe Date: Mon, 2 Jul 2018 10:20:50 -0600 Subject: Update clang format --- src/common/logging/filter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/logging/filter.cpp') diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index fdfb66696..733247b51 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp @@ -66,7 +66,7 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin, auto level_separator = std::find(begin, end, ':'); if (level_separator == end) { LOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: %s", - std::string(begin, end).c_str()); + std::string(begin, end).c_str()); return false; } -- cgit v1.2.3 From 76b475faf774a7a357bdc707e556c75f7975bc45 Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 2 Jul 2018 21:39:22 -0400 Subject: Fix build and address review feedback --- src/common/logging/filter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common/logging/filter.cpp') diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index 733247b51..4e783a577 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp @@ -65,14 +65,14 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin, const std::string::const_iterator end) { auto level_separator = std::find(begin, end, ':'); if (level_separator == end) { - LOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: %s", - std::string(begin, end).c_str()); + LOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: {}", + std::string(begin, end)); return false; } const Level level = GetLevelByName(level_separator + 1, end); if (level == Level::Count) { - LOG_ERROR(Log, "Unknown log level in filter: %s", std::string(begin, end).c_str()); + LOG_ERROR(Log, "Unknown log level in filter: {}", std::string(begin, end)); return false; } @@ -83,7 +83,7 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin, const Class log_class = GetClassByName(begin, level_separator); if (log_class == Class::Count) { - LOG_ERROR(Log, "Unknown log class in filter: %s", std::string(begin, end).c_str()); + LOG_ERROR(Log, "Unknown log class in filter: {}", std::string(begin, end)); return false; } -- cgit v1.2.3