Compiling without LOG_DIR
Mans
30 October 2013, 15:19
I'm compiling hiawatha for a system where I don't want to have any logs.
Omitting the log file entries in the conf file makes the web server start using default log paths. The defaults are defined in the serverconfig.c as follows
host->access_logfile = LOG_DIR"/access.log";
host->error_logfile = LOG_DIR"/error.log";
host->system_logfile = LOG_DIR"/system.log";
host->exploit_logfile = LOG_DIR"/exploit.log";
If I don't provide a LOG_DIR setting when configuring hiawatha the cmake scripts automatically sets LOG_DIR to "NULL" which gives us log paths looking like "NULL/access.log". This effectively stops the logging, but hiawatha complains upon start about not being able to access the files.
Is there a way to actually set the host->*_logfile variables to NULL so that no logging is begun (and no error messages) without being specified in hiawatha.conf ?
// Mans
Hiawatha version: 9.1
Operating System: linux
Hugo Leisink
30 October 2013, 15:27
How about only using /dev/null as the logfile in your configuration file?
Mans
31 October 2013, 10:55
Great idea, wish I had though of that myself.
Thanks.
This topic has been closed.