命令行:
logger -p "local7.info" -t "<programname>" "<message>"
放在shell里面
#!/bin/bash
function syslog() { logger -p "local7.info" -t "testsyslog[$$]" "$*"; }
syslog "Hello syslog"
命令行:
logger -p "local7.info" -t "<programname>" "<message>"
放在shell里面
#!/bin/bash
function syslog() { logger -p "local7.info" -t "testsyslog[$$]" "$*"; }
syslog "Hello syslog"
本文标题:如何输出到syslog
本文链接:https://www.haomeiwen.com/subject/nwhxmktx.html
网友评论