Re: [exim] not syslogging correctly

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Mike Sturdee
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] not syslogging correctly
Here's the relevant part of the result following +++ Writing the following
to syslog() and the truncated log line:

**** debug string too long - truncated ****


On Fri, 17 Dec 2004, Philip Hazel wrote:

> On Fri, 17 Dec 2004, Mike Sturdee wrote:
>
>> When logging to a file, the line is written correctly.
>
> Right. That means Exim has correctly set up the long line. In that case,
> when SYSLOG_LONG_LINES is set, it should just call syslog() with that
> data. In the 4.43 release, around line 110 of the log.c module you
> should see this:
>
>    if (pass == 0) linecount++; else
>      {
>      if (linecount == 1)
>        syslog(priority, "%.*s", plen, ss);
>      else
>        syslog(priority, "[%d%c%d] %.*s", i,
>          (ss[plen] == '\n' && tlen != 0)? '\\' : '/',
>          linecount, plen, ss);
>      }

>
> The code is complicated because is it tangled up with the splitting
> version. If you change that code to this:
>
>    if (pass == 0) linecount++; else
>      {
>      if (linecount == 1)
>        {
>        debug_printf("+++ Writing the following to syslog()\n");
>        debug_printf("%.*s", plen, ss);
>        syslog(priority, "%.*s", plen, ss);
>        }
>      else
>        syslog(priority, "[%d%c%d] %.*s", i,
>          (ss[plen] == '\n' && tlen != 0)? '\\' : '/',
>          linecount, plen, ss);
>      }

>
> (two debug_printf() lines added) and then run a suitable test with
> debugging (-d) turned on, the debug output will tell us whether this
> problem is Exim's fault or not.
>
>
> -- 
> Philip Hazel            University of Cambridge Computing Service,
> ph10@???      Cambridge, England. Phone: +44 1223 334714.
> Get the Exim 4 book:    http://www.uit.co.uk/exim-book

>


-Mike

==================================
Network Engineer
Pathway Internet Services
616.774.3131