From 6a5d207920f030e54710af12463f4a701c09b118 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Wed, 15 Sep 2021 10:15:24 +0200 Subject: Changed direct includes of spdlog/spdlog.h into zencore/logging.h to make it easier to tweak implementation --- zen/cmds/deploy.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'zen/cmds/deploy.cpp') diff --git a/zen/cmds/deploy.cpp b/zen/cmds/deploy.cpp index 3e5b77c20..b6ff53cf7 100644 --- a/zen/cmds/deploy.cpp +++ b/zen/cmds/deploy.cpp @@ -3,8 +3,7 @@ #include "deploy.h" #include - -#include +#include DeployCommand::DeployCommand() { -- cgit v1.2.3 From 2b9bed6635d95e15847c4d9b602e34d90e277d14 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Wed, 15 Sep 2021 11:27:48 +0200 Subject: Changed logging implementation * Code should no longer directly `#include spdlog/spdlog.h`, instead use `#include ` * Instead of explicit calls to `spdlog::info(...)` and such please use the logging macros defined in `zencore/logging.h`. I.e `ZEN_INFO`, `ZEN_DEBUG`, `ZEN_TRACE`, `ZEN_ERROR`, `ZEN_CRITITCAL` * The macros will pick up the "most local" logger via a `Log()` call to retrieve a logger instance. To override the default logger in a class please implement your own `Log()` function --- zen/cmds/deploy.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'zen/cmds/deploy.cpp') diff --git a/zen/cmds/deploy.cpp b/zen/cmds/deploy.cpp index b6ff53cf7..bee7baf90 100644 --- a/zen/cmds/deploy.cpp +++ b/zen/cmds/deploy.cpp @@ -2,8 +2,8 @@ #include "deploy.h" -#include #include +#include DeployCommand::DeployCommand() { @@ -60,7 +60,7 @@ DeployCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) if (IsTargetNew == false && m_IsClean) { - spdlog::info("Clean deploy -- deleting directory {}", Path8.c_str()); + ZEN_INFO("Clean deploy -- deleting directory {}", Path8.c_str()); std::filesystem::remove_all(ToPath); @@ -69,12 +69,12 @@ DeployCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) if (IsTargetNew) { - spdlog::info("Creating directory {}", Path8.c_str()); + ZEN_INFO("Creating directory {}", Path8.c_str()); std::filesystem::create_directories(ToPath); } - spdlog::info("Starting deploy operation..."); + ZEN_INFO("Starting deploy operation..."); // TODO: implement! -- cgit v1.2.3