From 681567b28116421496c4b7560a5b70f9730b8a79 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Fri, 23 Dec 2011 08:18:38 +0000 Subject: Use HTTPD ap_log_error instead of stderr to log when running inside HTTPD, to get log piping and rotation to work. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1222604 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/http/httpd.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sca-cpp/trunk/modules/http/httpd.hpp') diff --git a/sca-cpp/trunk/modules/http/httpd.hpp b/sca-cpp/trunk/modules/http/httpd.hpp index 06d53e28c2..f4e3767881 100644 --- a/sca-cpp/trunk/modules/http/httpd.hpp +++ b/sca-cpp/trunk/modules/http/httpd.hpp @@ -672,7 +672,6 @@ const char* debugOptional(const char* s) { * Log a header */ int debugHeader(unused void* r, const char* key, const char* value) { - gc_scoped_pool(); cdebug << " header key: " << key << ", value: " << value << endl; return 1; } @@ -681,7 +680,6 @@ int debugHeader(unused void* r, const char* key, const char* value) { * Log an environment variable */ int debugEnv(unused void* r, const char* key, const char* value) { - gc_scoped_pool(); cdebug << " var key: " << key << ", value: " << value << endl; return 1; } @@ -690,7 +688,6 @@ int debugEnv(unused void* r, const char* key, const char* value) { * Log a note. */ int debugNote(unused void* r, const char* key, const char* value) { - gc_scoped_pool(); cdebug << " note key: " << key << ", value: " << value << endl; return 1; } @@ -699,6 +696,8 @@ int debugNote(unused void* r, const char* key, const char* value) { * Log a request. */ const bool debugRequest(request_rec* r, const string& msg) { + if (!isDebugLog()) + return true; gc_scoped_pool(); cdebug << msg << ":" << endl; cdebug << " unparsed uri: " << debugOptional(r->unparsed_uri) << endl; -- cgit v1.2.3