[core] include lighttpd vers in server started msg

personal/stbuehler/mod-csrf
Glenn Strauss 6 years ago
parent ce0f2f61d2
commit bafe6abf04
  1. 2
      src/log.c
  2. 9
      src/server.c

@ -214,8 +214,6 @@ int log_error_open(server *srv) {
srv->errorlog_mode = (logfile[0] == '|') ? ERRORLOG_PIPE : ERRORLOG_FILE;
}
log_error_write(srv, __FILE__, __LINE__, "s", "server started");
if (srv->errorlog_mode == ERRORLOG_FD && !srv->srvconf.dont_daemonize) {
/* We can only log to stderr in dont-daemonize mode;
* if we do daemonize and no errorlog file is specified, we log into /dev/null

@ -1258,9 +1258,12 @@ static int server_main (server * const srv, int argc, char **argv) {
/* Close stderr ASAP in the child process to make sure that nothing
* is being written to that fd which may not be valid anymore. */
if (!srv->srvconf.preflight_check && -1 == log_error_open(srv)) {
log_error_write(srv, __FILE__, __LINE__, "s", "Opening errorlog failed. Going down.");
return -1;
if (!srv->srvconf.preflight_check) {
if (-1 == log_error_open(srv)) {
log_error_write(srv, __FILE__, __LINE__, "s", "Opening errorlog failed. Going down.");
return -1;
}
log_error_write(srv, __FILE__, __LINE__, "s", "server started (" PACKAGE_DESC ")");
}
if (buffer_is_empty(srv->config_storage[0]->server_tag)) {

Loading…
Cancel
Save