Web Servers on Unix and Linux - odd apache log output - single char outputs

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > August 2005 > odd apache log output - single char outputs





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author odd apache log output - single char outputs
Jeff

2005-08-09, 5:53 pm

Im running a red hat linux 9, apache 2.0.54 system
setup with mod_security (mod_security Im new to).
I have several programs that log to the error_log
file. C++ and php primarily.

I noticed that if I use <iostream> and cerr to
print to stderr, the log file gets the output
with 1 char per line for example 'test this'
would come out as:

t
e
s
t

t
h
i
s

(along with the other logging information. Sorry Im not on
my linux box here to cut and paste the example).

When i switch to fprintf(stderr,"test this\n");

It comes out the way I expect it to:

test this

Anyone understand what this behavior is and how to fix it
so I can use <iostream> cerr properly?

Thanks in advance,
Jeff

Jeff

2005-08-09, 5:53 pm

Forgot to mention one other thing, in both
fprintf and cerr cases, all my tab chars show
up as \t in the error_log. They used to tab over 8 spaces, now they
just print \t

This goes for fprintf(stderr,"\t Hello"); or
when I hit the tab key within the quote marks.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com