How to check syslog in Bash on Linux?

前端 未结 6 1453
执念已碎
执念已碎 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:54

    A very cool util is journalctl.

    For example, to show syslog to console: journalctl -t , where is identity you gave to function openlog to initialize syslog.

提交回复
热议问题