Get the App
SLTechnology News&Howtos  ›  Servers  › 

System logging using the logger command of linux

Shulou Source: shulou.com Published: 2022-06-02 19:25:24 09月22日 Update

This article mainly introduces the use of linux logger command system logging, the article is very detailed, has a certain reference value, interested friends must read it!

Logger is a shell command interface through which you can use Syslog's Syslog module and write a line of information directly to the Syslog file from the command line.

The logger logger provides a shell command interface for the syslog Syslog module by creating entries in the Syslog.

Syntax format: logger [parameters]

Common parameters:

Reference example

Write to the Syslog routine and view in / var/log/syslog:

[root@linuxcool ~] # logger System Rebooted

Record a specific file:

[root@linuxcool] # logger-f / home/a.txt above is all the contents recorded in the system log using linux's logger command. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Logs systems commands interfaces content parameters files modules references one line value information interests can be passed instances guys partners commonly used more entries Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno vpn MariaDB Docker Linux