System logging using the logger command of linux
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!