[OpenSER-Users] Re: SER 0.9.6 and xlog + syslog

Cesc Santa cesc.santa at gmail.com
Mon Jul 23 12:37:22 CEST 2007


Hi,

Sorry for the cross-posting, but I think that this problem effects ser
and openser.
I managed to "fix" the "newline with syslog" thing ... sure, it is a
hack, but it works for me. Hope that you guys can get inspired and
figure out a better way. Basically, what I do is look for \n or \r,
print up to there, skip the rest of \n and \r and then go for the next
"line".

BTW, I am using FC3 (i've seen the same with more recent FCs).

Cesc

On 7/23/07, Cesc Santa <cesc.santa at gmail.com> wrote:
> Hi,
>
> I just came across a strange "feature" in xlog for ser 0.9.6.
> When I send output to stderr, no problem ... but using the same config
> and sending to syslog, some xlog output gets trunkated :O
>
> I have these lines in my config:
>         xlog( "L_NOTICE",
> "============================================================\n");
>         xlog( "L_NOTICE", "==[%Tf]\n" );
>         xlog( "L_NOTICE", "==[%is ## %pp]\n==\n" );
>
>         #Print the whole received SIP message buffer ...
>         xlog( "L_NOTICE", "\n%mb\n\n");
>
> And this is what I get in /var/log/messages:
> Jul 23 01:45:09 FC3lara /usr/local/sbin/cafesRouter[21957]:
> =====================================
> Jul 23 01:45:09 ser[21957]: ==[Mon Jul 23 01:45:09 2007]
> Jul 23 01:45:09 ser[21957]: ==[192.168.200.141 ## 21957] ==
>    ntent-Length: 0ne/1.65.377a (SJ Labs)000000;rport2.0
>
> As you can see, the part of xlog which prints the sip message gets
> truncated ... it only prints the last part (ntent-Length .... ).
>
> Ideas?
>
> Cesc
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xlog.syslog.patch
Type: text/x-patch
Size: 2478 bytes
Desc: not available
Url : http://lists.kamailio.org/pipermail/users/attachments/20070723/9f93c337/attachment.bin 


More information about the Users mailing list