From 5674949c183db9220c19bd86e8a58537d15949b9 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Sun, 27 Sep 2020 14:10:45 +0300 Subject: [PATCH] fix sync --- src/Common/Macros.cpp | 11 ++++++----- src/Common/Macros.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Common/Macros.cpp b/src/Common/Macros.cpp index b98daa0ec78..b8e25499c0b 100644 --- a/src/Common/Macros.cpp +++ b/src/Common/Macros.cpp @@ -22,11 +22,12 @@ Macros::Macros(const Poco::Util::AbstractConfiguration & config, const String & macros[key] = config.getString(root_key + "." + key); if (key == "database" || key == "table" || key == "uuid") { - LOG_WARNING(log, - "Config file contains '{}' macro. This macro has special meaning " - "and it's explicit definition is not recommended. Implicit unfolding for " - "'database', 'table' and 'uuid' macros will be disabled.", - key); + if (log) + LOG_WARNING(log, + "Config file contains '{}' macro. This macro has special meaning " + "and it's explicit definition is not recommended. Implicit unfolding for " + "'database', 'table' and 'uuid' macros will be disabled.", + key); enable_special_macros = false; } } diff --git a/src/Common/Macros.h b/src/Common/Macros.h index c04405a83de..3082452e297 100644 --- a/src/Common/Macros.h +++ b/src/Common/Macros.h @@ -26,7 +26,7 @@ class Macros { public: Macros() = default; - Macros(const Poco::Util::AbstractConfiguration & config, const String & key, Poco::Logger * log); + Macros(const Poco::Util::AbstractConfiguration & config, const String & key, Poco::Logger * log = nullptr); struct MacroExpansionInfo {