Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 25400 invoked by uid 500); 5 Feb 2003 11:01:43 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 25370 invoked from network); 5 Feb 2003 11:01:42 -0000 Sender: Seema.Alevoor@Sun.COM Message-ID: <3E40EEC8.1C16D62B@Sun.COM> Date: Wed, 05 Feb 2003 16:30:24 +0530 From: Seema Alevoor Organization: Sun Microsystems X-Mailer: Mozilla 4.79C-CCK-MCD [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: users@httpd.apache.org, dev@httpd.apache.org Subject: Query regarding the logging in Apache Web Server Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, In my module, I'm trying to log a message at the debug level. Bit it is not getting logged, in spite of setting the LogLevel to debug within httpd.conf file. The message that I was trying to log does not have server_rec pointer. Instead, this parameter is passed as NULL. e.g., ap_log_error(APLOG_MARK, APLOGDEBUG|APLOG_NOERRORNO, NULL, "some message"); If I pass the actual server_rec pointer, it logs the message at the debug level. I'm using 1.3.27 version. I have looked at the apache sources and the logic used for logging is as follows: ----------------------------- static void log_error_core(const char *file, int line, int level, const server_rec *s, const request_rec *r, const char *fmt, va_list args) { char errstr[MAX_STRING_LEN]; size_t len; int save_errno = errno; FILE *logf; if (s == NULL) { /* * If we are doing stderr logging (startup), don't log messages that are * above the default server log level unless it is a startup/shutdown * notice */ if (((level & APLOG_LEVELMASK) != APLOG_NOTICE) && ((level & APLOG_LEVELMASK) > DEFAULT_LOGLEVEL)) return; logf = stderr; } else if (s->error_log) { ----------------------------- Since the default log level is APLOG_WARN, debug level messages would never get logged if server_rec is NULL. Is there a way to change the default level(from my module) ? Am I missing any other configuration which would log the debug messages ? Thanks in advance, Seema.