[[linux_wiki:logger]]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux_wiki:logger [2019/05/26 03:50] (current)
Line 1: Line 1:
 +====== Logger ======
 +
 +**General Information**
 +
 +Logger is a shell command interface to syslog.
 +
 +----
 +
 +====== Log Everwhere ======
 +
 +To log to three visible places in one command:
 +<code bash>
 +logger --stderr --priority local0.notice -t "My Prefix Here" "My Message Here" 2>&1 | tee /​dev/​console
 +</​code>​
 +  * --stderr ​ -> Log to ssh sessions
 +  * local0.notice ​ -> Log to /​var/​log/​messages
 +  * tee /​dev/​console ​ -> Log to the console device (visible if connected via KVM to a physical system or virtual console on a virtual machine)
 +
 +----
  
  • linux_wiki/logger.txt
  • Last modified: 2019/05/26 03:50
  • (external edit)