Redirecting standard output to syslog

前端 未结 5 1338
半阙折子戏
半阙折子戏 2021-01-01 20:57

I\'m planning to package OpenTibia Server for Debian. One of the things I want to do is add startup via /etc/init.d and daemonization of the otserv

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-01 21:18

    Try wrapping the execution of the binary with a suitable script, that just reads stdout and stderr, and send any data read from them on using syslog(). That should work without any code changes in the wrapped application, and be pretty easy.

    Not sure if there are existing scripts to pipe into, but writing one shouldn't be hard if not.

提交回复
热议问题