On Thursday 14 January 2010 07:27:22 Roman Gelfand wrote: > I am running a service which generates logs. What do I need to do to > haave these log entries also appear in syslog?
That's not how syslog works. There's isn't a process that goes through and gathers logs from various services and glues them together into a unified syslog. Instead there's a unified syslog service (C system call) that multiple applications can use. Each time a log is made it is tagged with a "facility" and "level". Then your syslog daemon receives all these logs. It writes most of them out to syslog, but it can also differentiate based on facility, level, and content of the log message. > BTW.. I modified /etc/rsyslog.conf file adding 'abcf.* > -/var/log/abc.log' line. This didn't make a difference. This would mean that anything logged using the syslog interface (C language call) that started with abcf.* would be written to /var/log/abc.log by your syslog daemon. It does not causes the syslog daemon to pull messages out of /var/log/abc.log, add the "abcf" prefix and append them to /var/log/syslog. If you want the syslog daemon to see the messages logged by a program, that program has to support using syslog and you have to configure it to write to syslog (generally by specifying a facility and, optionally, a prefix), possibly in addition to other logging. Then, if you want the messages to appear somewhere in addition to / instead of /var/log/syslog, you configure your syslog daemon by filtering on the facility/level/content. -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/
signature.asc
Description: This is a digitally signed message part.