Article 6FV6G How to remove my hostname from /var/log/syslog output?

How to remove my hostname from /var/log/syslog output?

by
bariswheel
from LinuxQuestions.org on (#6FV6G)
I want to improve readability of my syslog output by removing my hostname from every line logged. It's useless to me. Let's assume my hostname is john.corp.company.com

I run this command: sudo grc tail -f /var/log/syslog

To get logs on my terminal shell in realtime. What I tried:

sudo grc tail -f /var/log/syslog | sed 's/^john\.corp\.company\.com[[:blank:]]*//'

But then I lost the coloring that grc provides. I also tried similar commands with 'cut', 'awk', but those commands while they may do the job, I lose the coloring, and I really want to see the process in red, which is what GRC gives me.

At the end of the day, my goal is to get a realtime log of /var/log/syslog that is more readable, without the hostname, and even without the microseconds, as that makes the log line long as well, all I want to see really is the process name, and the message, and the time in seconds.

But question specifically here is how do I use grc still, remove the hostname from the output, and still have it redirect to stdout ?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments