mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-05-10 20:48:46 +02:00
「🏗️」 wip: added log debug function with VERBOSE mode
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/24 15:10:07 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/11 12:12:56 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/04/11 14:56:56 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -52,12 +52,6 @@ Server::Server(std::string file_name) {
|
||||
std::map<std::string, toml::ANode *> *map;
|
||||
_table = tomlFile->getParsedFile();
|
||||
|
||||
void *val = _table->access("log_file", toml::STRING, found);
|
||||
std::string log_file = "";
|
||||
if (found == true && val != not_nullptr) {
|
||||
std::string log_file = *static_cast<std::string *>(val);
|
||||
}
|
||||
_log = new Logger(log_file);
|
||||
try {
|
||||
_table = _getServerTable();
|
||||
} catch(std::runtime_error &e) {
|
||||
@ -66,6 +60,13 @@ Server::Server(std::string file_name) {
|
||||
delete _log;
|
||||
throw e;
|
||||
}
|
||||
void *val = _table->access("log_file", toml::STRING, found);
|
||||
std::string log_file = "";
|
||||
if (found == true && val != not_nullptr) {
|
||||
std::string log_file = *static_cast<std::string *>(val);
|
||||
std::cout << log_file << std::endl;
|
||||
}
|
||||
_log = new Logger(log_file);
|
||||
|
||||
// host and port parsing
|
||||
void *host = accessValue("host", toml::STRING, _table, _log);
|
||||
|
Reference in New Issue
Block a user