The patch allows to redirect all log messages from stdout to syslog. diff -ruN git/uxfp/main.c git/uxfp/main.c --- git/uxfp/main.c +++ git/uxfp/main.c @@ -47,6 +47,7 @@ bool json; bool report; bool no_fastboot_driver; + bool syslog; } options = {0}; flag_t flags [] = { @@ -62,6 +63,7 @@ {"--show-diag-ports", "-w", VALUE_TYPE_BOOLEAN, &options.show_connected_diag_ports, OPT, "only show connected diagnostic ports and exit"}, {"--json", "-j", VALUE_TYPE_BOOLEAN, &options.json, OPT, "log in JSON format (automatically enable --report)"}, {"--report", NULL, VALUE_TYPE_BOOLEAN, &options.report, OPT, "final JSON report (do not enable --json automatically)"}, + {"--syslog", "-n", VALUE_TYPE_BOOLEAN, &options.syslog, OPT, "all the logs redirected to syslog"}, {NULL, NULL, VALUE_TYPE_UNKNOWN, NULL, OPT, NULL}, }; @@ -139,6 +141,10 @@ if (options.json) { options.report = true; core_log_set_pprint(CORE_LOG_PPRINT_JSON); + } + + if (options.syslog) { + core_log_set_native(true); } print_version_string();