如何输出到syslog
2020-10-17 本文已影响0人
CodingCode
命令行:
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"