Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

How to read from syslog?

Writer Mia Lopez

I can write to syslog via:

logger "foo bar baz"

but how do I read from syslog? my only guess is:

tail -f /var/log/syslog

but that doesn't seem right from my testing.

Note: also looking for a way to delete/drain all syslog logs/messages.

1 Answer

tail -f shows what happens after it is run, so you need to start that command before issuing the logger command.

Syslog is just a text file. so you can read it with anything that handles those - less is often used. (You can also grep or otherwise manipulate its output to look for certain things)

It is possible that the logging us not going to syslog - look at /var/log/messages, and if that does not work look at /etc/rsyslog* to track where logging is going.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy