🏗️」 wip: Added help msg

This commit is contained in:
2025-04-10 14:19:30 +02:00
parent 4a2bd9fe21
commit 8dff506caf
6 changed files with 103 additions and 7 deletions

16
includes/help.hpp Normal file
View File

@ -0,0 +1,16 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* help.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/10 13:43:54 by adjoly #+# #+# */
/* Updated: 2025/04/10 13:58:52 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#pragma once
#define SAMPLE_CONF_PATH "./sample.conf"
#define WEBSRV_VERSION "v0.1"

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/20 09:28:27 by adjoly #+# #+# */
/* Updated: 2025/03/25 17:50:45 by adjoly ### ########.fr */
/* Updated: 2025/04/10 13:56:33 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -29,10 +29,7 @@ class Logger {
_ttyOnly = false;
}
if (!_file.is_open() && !_ttyOnly) {
throw std::runtime_error(
"could not open fileeee"); // TODO change that shit but i dont
// know what to put other than a
// htrow
warn("could not open logfile, going tty only");
}
}
@ -97,7 +94,8 @@ class Logger {
const std::string &what,
const std::string &msg) {
std::stringstream os;
#ifdef tty
#ifdef TTY
(void)emoji;
if (what.empty())
os << type << ":" << msg;
else

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/11 13:29:21 by mmoussou #+# #+# */
/* Updated: 2025/02/12 00:11:41 by mmoussou ### ########.fr */
/* Updated: 2025/04/10 13:58:56 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */