mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-05-10 19:18:46 +02:00
「✨」 feat: added debug function in log class
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/20 09:28:27 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/22 14:46:05 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/04/22 16:14:25 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -109,6 +109,19 @@ class Logger {
|
||||
}
|
||||
}
|
||||
|
||||
void debug(const std::string &msg) {
|
||||
#ifdef VERBOSE
|
||||
std::string ss = printPogitMsg("🏗️", "webserv", "debug", msg);
|
||||
std::cerr << ss << std::endl;
|
||||
if (!_ttyOnly) {
|
||||
_file << ss << std::endl;
|
||||
}
|
||||
#else
|
||||
(void)msg;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
protected:
|
||||
private:
|
||||
std::string printPogitMsg(const std::string &emoji, const std::string &type,
|
||||
|
Reference in New Issue
Block a user