From 7abe04bf449de4b69037994dccc76d7bb3be9015 Mon Sep 17 00:00:00 2001 From: adjoly Date: Tue, 22 Apr 2025 14:51:00 +0200 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=F0=9F=94=A8=E3=80=8D=20fix:=20fixed?= =?UTF-8?q?=20compilation=20error=20with=20logger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- includes/log.hpp | 4 ++-- src/config/Route.cpp | 1 + src/main.cpp | 7 ++++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b447634..971b463 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: adjoly +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2024/10/25 16:09:27 by adjoly #+# #+# # -# Updated: 2025/04/22 14:31:00 by adjoly ### ########.fr # +# Updated: 2025/04/22 14:32:50 by adjoly ### ########.fr # # # # **************************************************************************** # diff --git a/includes/log.hpp b/includes/log.hpp index d9aaa5a..96fee4a 100644 --- a/includes/log.hpp +++ b/includes/log.hpp @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/03/20 09:28:27 by adjoly #+# #+# */ -/* Updated: 2025/04/22 11:50:42 by mmoussou ### ########.fr */ +/* Updated: 2025/04/22 14:46:05 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -134,6 +134,6 @@ class Logger { std::ofstream _file; }; -Logger *_log = NULL; +extern Logger *_log; }; // namespace webserv diff --git a/src/config/Route.cpp b/src/config/Route.cpp index ecd16d0..43e6d5b 100644 --- a/src/config/Route.cpp +++ b/src/config/Route.cpp @@ -15,6 +15,7 @@ #include #include + using namespace webserv::config; std::map *Route::_parseCGI(toml::ANode *table) { diff --git a/src/main.cpp b/src/main.cpp index 49cf161..4476e72 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,7 +6,7 @@ /* By: mmoussou #include #include +#include #include +namespace webserv { + Logger *_log = not_nullptr; +} + int _sig = 0; void ft_sig(int sig) {