Skip to content

Commit

Permalink
fix: compile it
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Ruzafa committed Mar 22, 2024
1 parent e5450a4 commit d7c78fe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ PARSER_PREFIXS = Command User Pass Nick Quit
PARSER_FILES = $(addsuffix Parser, $(PARSER_PREFIXS))
PARSER_SRCS = $(addprefix $(PARSER_DIR), $(PARSER_FILES))

FILES = main Server User Channel utils
FILES = main Server User Channel utils Logger

SRCS_PATHS = $(addprefix $(SRC_DIR)/, $(FILES)) $(CMD_SRCS) $(PARSER_SRCS)
SRCS = $(addsuffix .cpp, $(SRCS_PATHS))
Expand Down
4 changes: 3 additions & 1 deletion includes/Logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ class Logger {
Logger(void);
~Logger(void);

static const bool _debugMode = false;

public:
static void debug(std::string message);
};

#endif
#endif
5 changes: 2 additions & 3 deletions src/Logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Logger::Logger(void) {}
Logger::~Logger(void) {}

void Logger::debug(std::string message) {
#ifdef DEBUG
std::cout << "[DEBUG] " << message << std::endl;
#endif
if (Logger::_debugMode)
std::cout << "[DEBUG] " << message << std::endl;
}

0 comments on commit d7c78fe

Please sign in to comment.