Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.apps > #361

Re: logging

From Bill M <wpmccormick@just_about_everywhere.com>
Newsgroups comp.os.linux.development.apps
Subject Re: logging
Date 2012-01-06 14:52 -0600
Organization A noiseless patient Spider
Message-ID <je7mtk$ald$1@dont-email.me> (permalink)
References <je541k$f4o$1@dont-email.me> <87r4zdn3id.fsf@sapphire.mobileactivedefense.com> <je5fvk$q33$1@dont-email.me> <1bvcoph3dw.fsf@pfeifferfamily.net>

Show all headers | View raw


Joe Pfeiffer wrote, On 1/5/2012 10:16 PM:
> Bill M<wpmccormick@just_about_everywhere.com>  writes:
>
>> Rainer Weikusat wrote, On 1/5/2012 5:17 PM:
>>> Bill M<wpmccormick@just_about_everywhere.com>   writes:
>>>> I'm researching logging for C applications to run on Debian
>>>> Squeeze. Having previous experience with log4net, ported from log4j, I
>>>> see it has also been ported to log4c. It appears to be a project
>>>> without much recent activity and support.
>>>>
>>>> Does anyone here have any experience with log4c? Comments?
>>>>
>>>> Would anyone care to recommend a logger API?
>>>
>>> I'd vote for syslog as well. That's a standardized facility for
>>> collecting unspecified 'diagnostic output'[*] from any number of
>>> applications in a central place and it saves people using your
>>> software (even it that's only you) to deal with another logfile
>>> sitting in some random place (and presumably, growing and growing and
>>> ... until the disk is full)
>>>
>>> 	[*] No, that's not supposed to be an auditing log for 'events
>>> 	which occured on the system' although it is also used as such.
>>
>>
>> Thanks. Syslog it is then. Actually I have Rsyslogd, which appears to
>> be much more capable than the old syslog I was sort of familiar with.
>
> I was a little embarrassed to discover a few weeks ago, and only because
> of Red Hat's apparent attempt to hijack system logging, that rsyslogd is
> indeed a terrific system -- I now have all my machines sending their
> logs off to a single machine, simplifying things immensely.  This whole
> new logging infrastructure got implemented without me ever noticing....
>
>> It looks like I should be able to setup a .conf file under
>> /etc/rsyslog.d and log different program's output to different log
>> files using a property-based filter, perhaps in combination with a
>> traditional facility/priority selector. Is that the right way to
>> approach this? What sort of additional features might I want to
>> consider?
>
> Sounds right.
>
>> Of course, I'll use the standard logrotate facility to make sure log
>> files don't grow forever.
>
> My previous point (about syslog-based logging integrating with other
> tools) exactly!

I'm having some difficulty: Just to get things going, my ocxserverd app 
is using the LOG_LOCAL0 facility.

My rsyslog.conf has a rule like this:
$IncludeConfig /etc/rsyslog.d/*.conf

So I have a /etc/rsyslog.d/ocxserverd.conf file with a single rule:

log_local0.*	/var/log/ocxserverd.log

My syslog messages from ocxserverd are going to /var/log/messages.

Yes, I restarted rsyslogd.

Any ideas?

Thanks

Back to comp.os.linux.development.apps | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

logging Bill M <wpmccormick@just_about_everywhere.com> - 2012-01-05 15:17 -0600
  Re: logging Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2012-01-05 15:41 -0700
  Re: logging Lew Pitcher <lpitcher@teksavvy.com> - 2012-01-05 17:56 -0500
    Re: logging Bill M <wpmccormick@just_about_everywhere.com> - 2012-01-05 17:33 -0600
      Re: logging Lew Pitcher <lpitcher@teksavvy.com> - 2012-01-05 19:31 -0500
  Re: logging Rainer Weikusat <rweikusat@mssgmbh.com> - 2012-01-05 23:17 +0000
    Re: logging Bill M <wpmccormick@just_about_everywhere.com> - 2012-01-05 18:41 -0600
      Re: logging Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2012-01-05 21:16 -0700
        Re: logging Bill M <wpmccormick@just_about_everywhere.com> - 2012-01-06 14:52 -0600
          Re: logging Bill M <wpmccormick@just_about_everywhere.com> - 2012-01-06 16:39 -0600
      Re: logging Bill M <wpmccormick@just_about_everywhere.com> - 2012-01-09 17:58 -0600
        Re: logging Kaz Kylheku <kaz@kylheku.com> - 2012-01-10 00:13 +0000

csiph-web