mirror of
https://github.com/lxsang/ant-http
synced 2025-07-13 13:04:23 +02:00
user syslog for logging
This commit is contained in:
5
httpd.c
5
httpd.c
@ -123,6 +123,8 @@ void configure_context(SSL_CTX *ctx)
|
||||
|
||||
void stop_serve(int dummy) {
|
||||
UNUSED(dummy);
|
||||
// close log server
|
||||
closelog ();
|
||||
sigset_t mask;
|
||||
sigemptyset(&mask);
|
||||
//Blocks the SIG_IGN signal (by adding SIG_IGN to newMask)
|
||||
@ -166,6 +168,9 @@ int main(int argc, char* argv[])
|
||||
signal(SIGINT, stop_serve);
|
||||
|
||||
config_t* conf = config();
|
||||
// start syslog
|
||||
setlogmask (LOG_UPTO (LOG_NOTICE));
|
||||
openlog (SERVER_NAME, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_USER);
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
if( conf->enable_ssl == 1 )
|
||||
|
Reference in New Issue
Block a user