Quantcast
Channel: Write to syslog from the command line - Ask Ubuntu
Browsing latest articles
Browse All 4 View Live

Answer by DarkNeuron for Write to syslog from the command line

As a dev, I rarely have time to closely study man pages, so TLDR:logger -p local0.notice -t ${0##*/}[$$] Hello worldThe gibberish in the middle will translate to the calling program. So if you check...

View Article


Answer by Sylvain Pineau for Write to syslog from the command line

Alternatively, you can write to syslog from python:python -c 'import syslog; syslog.syslog("Hello World")'

View Article

Answer by Drew Noakes for Write to syslog from the command line

Use the logger command.logger Some message to writeThere are several options available, including:-i Log the process ID in each line-f Log the contents of a specified file-n Write to the specified...

View Article

Write to syslog from the command line

How can I write an entry into /var/log/syslog from the command line?

View Article
Browsing latest articles
Browse All 4 View Live