[Y-devel][PATCH] Y logging into wrong log
red_alert red_alert at the-psychiatry.ch
Sun Feb 29 22:34:09 GMT 2004
yea, it's working for me.
my syslog.conf (as far as i remember, i didn't change anything manually):
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* /var/log/maillog
# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages
*.emerg *
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local7.* /var/log/boot.log
regards
red_alert
Chris Amshey schrieb:
> On Sat, Feb 28, 2004 at 08:15:56PM +0100, red_alert wrote:
>
>>i just realized, that Y is additionaly logging to /var/log/boot.log
>>
>>besides that, it's correctly logging to /var/log/messages. and i don't
>>have a /var/log/syslog.
>>
>>i'm using Y 0.2 p26 on SDL.
>>
>>and i'm running fedora core 1.
>>
>>regards
>>red_alert
>
> This is not really a mistake on Y's part. Y is doing a regular
> openlog to the LOCAL7 syslog facility. If Y messages show up somewhere
> strange on some 'particular' distribution, it's probably because they're
> using LOCAL7 for something.
>
> Still, redhat has an obnoxiously huge userbase, so here's a patch
> (apply with: patch -p1 < syslog.patch) that will change the facility
> to LOCAL5.
>
> I don't have a redhat system, so you'll just have to test the patch
> and see what happens. Let me know if it works. You might also post
> your syslog.conf if you want an actually accurate diagnosis and for
> us to avoid other logging facility collisions.
>
>
> --Chris
>
>
>
>
>
> ------------------------------------------------------------------------
>
> --- old/Y/util/log.h 2004-02-28 20:45:00.000000000 -0500
> +++ new/Y/util/log.h 2004-02-28 20:44:35.000000000 -0500
> @@ -6,7 +6,7 @@
> #include <syslog.h>
>
> #if 1
> -#define Y_LOG_INIT() do { openlog ("Y", LOG_CONS|LOG_NDELAY|LOG_PID, LOG_LOCAL7); } while (0)
> +#define Y_LOG_INIT() do { openlog ("Y", LOG_CONS|LOG_NDELAY|LOG_PID, LOG_LOCAL5); } while (0)
>
> #define Y_SILENT(str, ...)
> #define Y_DEBUG(str, ...) do { syslog (LOG_DEBUG, "%s:%d: " str "\n", __FUNCTION__, __LINE__ ,##__VA_ARGS__ ); } while (0)
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved