diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2019-11-30 14:10:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-30 14:10:14 +0200 |
commit | 3ca455e79ee8e3bf3e662d95a174d20802e21b7a (patch) | |
tree | 049eaaf00e90dc1d68457eb036d6a5e56d8fba61 | |
parent | 52e6151d11a50a4442bde65f5f5d941a9f73a4ae (diff) | |
parent | 50751d675a725512b99718ef4b739f4f47b5af09 (diff) |
Merge pull request #10667 from ysc3839/ttyd
ttyd: log to syslog
-rw-r--r-- | utils/ttyd/Makefile | 2 | ||||
-rw-r--r-- | utils/ttyd/patches/100-log-to-syslog.patch | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/utils/ttyd/Makefile b/utils/ttyd/Makefile index d2695d3ce..8fa6c7ced 100644 --- a/utils/ttyd/Makefile +++ b/utils/ttyd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ttyd PKG_VERSION:=1.5.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/tsl0922/ttyd/tar.gz/$(PKG_VERSION)? diff --git a/utils/ttyd/patches/100-log-to-syslog.patch b/utils/ttyd/patches/100-log-to-syslog.patch new file mode 100644 index 000000000..392673270 --- /dev/null +++ b/utils/ttyd/patches/100-log-to-syslog.patch @@ -0,0 +1,20 @@ +--- a/src/server.c ++++ b/src/server.c +@@ -6,6 +6,7 @@ + #include <getopt.h> + #include <signal.h> + #include <sys/stat.h> ++#include <syslog.h> + + #include <libwebsockets.h> + #include <json.h> +@@ -418,7 +419,8 @@ main(int argc, char **argv) { + return -1; + } + +- lws_set_log_level(debug_level, NULL); ++ openlog("ttyd", LOG_NDELAY | LOG_PID, LOG_DAEMON); ++ lws_set_log_level(debug_level, lwsl_emit_syslog); + + #if LWS_LIBRARY_VERSION_MAJOR >= 2 + char server_hdr[128] = ""; |