How to check syslog in Bash on Linux?

前端 未结 6 1457
执念已碎
执念已碎 2021-01-31 13:20

In C we log this way:

syslog( LOG_INFO, \"proxying %s\", url );

In Linux how can we check the log?

6条回答
  •  旧巷少年郎
    2021-01-31 13:52

    If you like Vim, it has built-in syntax highlighting for the syslog file, e.g. it will highlight error messages in red.

    vi +'syntax on' /var/log/syslog
    

提交回复
热议问题