bug-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: cfengine2: syslog messages display the hostname inst


From: Mark Burgess
Subject: Re: address@hidden: cfengine2: syslog messages display the hostname instead of the process name]
Date: Mon, 10 Feb 2003 17:09:44 +0100 (MET)

On 10 Feb, Andrew Stribblehill wrote:
> This is reproducible on 2.0.5b1 too on Linux. Looks like the problem
> is that VPREFIX changes over the duration of the process. openlog()
> must record the char* that is the prefix parameter as a global
> variable somewhere, and then syslog() just prints that each time,
> even if it's changed.
> 
> The following test code demonstrates it nicely:
> ----------------syslog_prefix.c-------------------
> #include <stdio.h>
> #include <syslog.h>
> 
> int main(void)
> {
>     char PREFIX[1024];
>     openlog(PREFIX, LOG_ODELAY|LOG_PID, LOG_USER);
>     syslog(LOG_ERR, "Moo");
>     sprintf(PREFIX, "prefix");
>     syslog(LOG_ERR, "Baa");
>     return 0;
> }
> ----------------syslog_prefix.c-------------------
> 
> If VPREFIX can't be stopped from changing, could we have a new
> variable that doesn't mutate?
> 
> Thanks.
> 
> ----- Forwarded message from Graeme Mathieson <address@hidden> -----
> 
> From: Graeme Mathieson <address@hidden>
> Subject: cfengine2: syslog messages display the hostname instead of
> the   process name
> To: Debian Bug Tracking System <address@hidden>
> Date: Wed, 06 Nov 2002 15:30:29 +0000
> 
> Package: cfengine2
> Version: 2.0.4-1
> Severity: minor
> 
> [ Like I've not bugged you enough today already. :-) ]
> 
> Sometimes the various cf.* processes that log to syslog show the name
> of the process:
> 
> Nov  6 14:20:19 freyja cfservd[11405]:  Logical start time Wed Nov  6 
> 14:08:24 2002
> 
> but sometimes, the decide to replace the process name with the
> hostname:
> 
> Nov  6 08:58:42 freyja freyja[8315]: cfservd starting Wed Nov  6 08:58:42 2002
> 
> which makes getting logcheck to spot (or ignore) them a nuisance.
> 
> -- System Information:
> Debian Release: testing/unstable
> Architecture: i386
> Kernel: Linux dream.in.wossname.org.uk 2.4.19-acpi #4 Sat Aug 17
> 21:59:56 BST 2002 i686 Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL
> set)
> 
> Versions of packages cfengine2 depends on:
> ii  libc6                         2.3.1-3    GNU C Library: Shared
> libraries an ii  libdb3                        3.2.9-17   Berkeley v3
> Database Libraries [ru ii  libssl0.9.6                   0.9.6g-10 
> SSL shared libraries ii  perl                          5.8.0-13  
> Larry Wall's Practical Extraction
> 
> -- no debconf information
> 
> ----- End forwarded message -----
> 



This is not supposed to change. If you find out why, let me know


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

[Prev in Thread] Current Thread [Next in Thread]