Quantcast
Channel: Write to syslog from the command line - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4

Answer by DarkNeuron for Write to syslog from the command line

$
0
0

As a dev, I rarely have time to closely study man pages, so TLDR:

logger -p local0.notice -t ${0##*/}[$$] Hello world

The gibberish in the middle will translate to the calling program. So if you check the bottom of syslog you'll see something like:

May 07 08:27:14 ip-10-1-11-166 -bash[42108]: Hello world

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>