FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-14-2010, 12:27 PM
Roman Gelfand
 
Default syslog on Lenny

I am running a service which generates logs. What do I need to do to
haave these log entries also appear in syslog?

BTW.. I modified /etc/rsyslog.conf file adding 'abcf.*
-/var/log/abc.log' line. This didn't make a difference.

Thanks in advance


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-14-2010, 05:23 PM
"Boyd Stephen Smith Jr."
 
Default syslog on Lenny

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. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
 
Old 01-15-2010, 08:07 AM
Michael Biebl
 
Default syslog on Lenny

Boyd Stephen Smith Jr. wrote:
> 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.

Thanks Boyd for the nice explanation.

I just want to add, that rsyslog actually has the ability to pull messages out
of an arbitrary file (although I wouldn't use this mechanism on a syslog log
file). See http://www.rsyslog.com/doc-imfile.html for further info

Cheers,
Michael
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
 

Thread Tools




All times are GMT. The time now is 08:02 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org