httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <>
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);



The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message