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(a)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