Skip to content
Snippets Groups Projects
Commit 11fdbd84 authored by Andy Green's avatar Andy Green
Browse files

lwsws: logging: use stderr not syslog directly

systemd is completely at home using stderr logging to the journal,
without needing syslog apis.
parent ebed5e74
No related branches found
No related tags found
No related merge requests found
...@@ -211,7 +211,7 @@ int main(int argc, char **argv) ...@@ -211,7 +211,7 @@ int main(int argc, char **argv)
int n = 0, budget = 100, debug_level = 1024 + 7; int n = 0, budget = 100, debug_level = 1024 + 7;
#ifndef _WIN32 #ifndef _WIN32
int m; int m;
int status, syslog_options = LOG_PID | LOG_PERROR; int status;//, syslog_options = LOG_PID | LOG_PERROR;
#endif #endif
strcpy(config_dir, "/etc/lwsws"); strcpy(config_dir, "/etc/lwsws");
...@@ -281,11 +281,11 @@ int main(int argc, char **argv) ...@@ -281,11 +281,11 @@ int main(int argc, char **argv)
#ifndef _WIN32 #ifndef _WIN32
/* we will only try to log things according to our debug_level */ /* we will only try to log things according to our debug_level */
setlogmask(LOG_UPTO (LOG_DEBUG)); // setlogmask(LOG_UPTO (LOG_DEBUG));
openlog("lwsws", syslog_options, LOG_DAEMON); // openlog("lwsws", syslog_options, LOG_DAEMON);
#endif #endif
lws_set_log_level(debug_level, lwsl_emit_syslog); lws_set_log_level(debug_level, NULL); // lwsl_emit_syslog);
lwsl_notice("lwsws libwebsockets web server - license CC0 + LGPL2.1\n"); lwsl_notice("lwsws libwebsockets web server - license CC0 + LGPL2.1\n");
lwsl_notice("(C) Copyright 2010-2018 Andy Green <andy@warmcat.com>\n"); lwsl_notice("(C) Copyright 2010-2018 Andy Green <andy@warmcat.com>\n");
......
...@@ -6,7 +6,6 @@ After=syslog.target ...@@ -6,7 +6,6 @@ After=syslog.target
ExecStart=/usr/local/bin/lwsws ExecStart=/usr/local/bin/lwsws
ExecReload=/usr/bin/kill -HUP $MAINPID ExecReload=/usr/bin/kill -HUP $MAINPID
ExecStop=/usr/bin/killall lwsws ExecStop=/usr/bin/killall lwsws
StandardError=null
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment