Redirecting standard output to syslog

前端 未结 5 1292
半阙折子戏
半阙折子戏 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:24

    You can pipe your stdout to syslog with the logger command:

    NAME

     logger - a shell command interface to the syslog(3) system log module
    

    SYNOPSIS

     logger [-isd] [-f file] [-p pri] [-t tag] [-u socket] [message ...]
    

    DESCRIPTION

     Logger makes entries in the system log.  It provides a shell command
     interface to the syslog(3) system log module.
    

    If you don't supply a message on the command line it reads stdin

提交回复
热议问题