You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
492 B

  1. --- a/src/server.c
  2. +++ b/src/server.c
  3. @@ -6,6 +6,7 @@
  4. #include <getopt.h>
  5. #include <signal.h>
  6. #include <sys/stat.h>
  7. +#include <syslog.h>
  8. #include <libwebsockets.h>
  9. #include <json.h>
  10. @@ -418,7 +419,8 @@ main(int argc, char **argv) {
  11. return -1;
  12. }
  13. - lws_set_log_level(debug_level, NULL);
  14. + openlog("ttyd", LOG_NDELAY | LOG_PID, LOG_DAEMON);
  15. + lws_set_log_level(debug_level, lwsl_emit_syslog);
  16. #if LWS_LIBRARY_VERSION_MAJOR >= 2
  17. char server_hdr[128] = "";