I need to manually dispatch syslog events with a custom format so that I can test and debug a syslog configuration and log parser. In other words I want an event of a specific facility with some custom text and data and I want to be able to fire it at a specific time so that I can test if the syslog daemon logs it correctly and the parser processes it correctly.
Does anyone know a tool that lets me do that?
Name:
Anonymous2007-10-04 18:12
echo "whatever" >> /var/log/syslog
man cron
Name:
Anonymous2007-10-04 18:26
Thanks but that doesn't really help because if I write to the syslog files directly, the messages don't get processed by syslog-ng which is supposed to filter and reprocess them. And I ultimately want syslog-ng to write to a database instead of log files, so that shortcut is out of the question.
Side note: Yes, I do know "logger" but I need a more sophisticated tool.
Name:
Anonymous2007-10-04 19:40
Read the syslog(3) man page, and write the 10-line C program to do what you want.
Name:
Anonymous2007-10-04 21:29
IM this guy, he knows. And if he denies it keep asking he'll eventually tell you he's a nerd. And insult him that'll motivate him seriously.
AIM: ELErs55
AIM: ELErs55
AIM: ELErs55
AIM: ELErs55
AIM: ELErs55
AIM: ELErs55
AIM: ELErs55
AIM: ELErs55
AIM: ELErs55
AIM: ELErs55