httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] Log output from fprintf(stdout, ...)
Date Fri, 05 Jun 2009 09:43:01 GMT
On Thu, 2009-06-04 at 11:36 -0700, Vyacheslav Zholudev wrote:
> I have an Apache Module which contains such methods like 
> fprintf(stderr, "%s\n", message); and fprintf(stdout, "%s\n", message);
> 
> They are executed under certain circumstances, but I can't see the output in
> the Apache's log files.
> 
> I use directive ErrorLog and CustomLog ... combined with LogLevel debug, but
> still can't see the result of my fprintfs. 
> Does anybody have an idea what I might do wrong? 
> 
> Thanks in advance,
> Vyacheslav

Use ap_log_error() instead. eg

#include <http_log.h>

void ap_log_error(const char *file, int line, int level, const
server_rec *s, const char* fmt, ...);

Typically, you would use macros for the first two arguments:

ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->s, "%s", message);

Cheers

Tom


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message