From 500e4e41feb9210fd3d5db6a49d6ca7dc59bed34 Mon Sep 17 00:00:00 2001 From: "roberto@mrspurr" Date: Fri, 7 Jan 2011 23:17:34 +0100 Subject: [PATCH] uwsgi_rawlog() --- buildconf/default.ini | 2 +- plugins/python/pyloader.c | 4 ++-- uwsgi.c | 14 +++++++------- uwsgi.h | 1 + 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/buildconf/default.ini b/buildconf/default.ini index 61743ef3..eb4030a0 100644 --- a/buildconf/default.ini +++ b/buildconf/default.ini @@ -19,7 +19,7 @@ evdis = false ldap = false routing = false stackless = false -debug = true +debug = false unbit = false xml_implementation = libxml2 plugins = diff --git a/plugins/python/pyloader.c b/plugins/python/pyloader.c index c199f654..424c99a4 100644 --- a/plugins/python/pyloader.c +++ b/plugins/python/pyloader.c @@ -272,13 +272,13 @@ int init_uwsgi_app(int loader, void *arg1, struct wsgi_request *wsgi_req, PyThre } if (!wsgi_req->script_name_len) { - uwsgi_log(" (default app)"); + uwsgi_rawlog(" (default app)"); uwsgi.default_app = id; } uwsgi.apps_cnt++; - uwsgi_log("\n"); + uwsgi_rawlog("\n"); if (multiapp > 1) { for(i=1;ihooks[UWSGI_MODIFIER_PING] = uwsgi_request_ping; //100 uwsgi_log("*** Operational MODE: "); if (uwsgi.threads > 1) { if (uwsgi.numproc > 1) { - uwsgi_log("preforking+threaded"); + uwsgi_rawlog("preforking+threaded"); } else { - uwsgi_log("threaded"); + uwsgi_rawlog("threaded"); } } #ifdef UWSGI_ASYNC else if (uwsgi.async > 1) { if (uwsgi.numproc > 1) { - uwsgi_log("preforking+async"); + uwsgi_rawlog("preforking+async"); } else { - uwsgi_log("async"); + uwsgi_rawlog("async"); } } #endif else if (uwsgi.numproc > 1) { - uwsgi_log("preforking"); + uwsgi_rawlog("preforking"); } else { - uwsgi_log("single process"); + uwsgi_rawlog("single process"); } - uwsgi_log(" ***\n"); + uwsgi_rawlog(" ***\n"); #ifdef UWSGI_ERLANG if (uwsgi.erlang_node) { diff --git a/uwsgi.h b/uwsgi.h index 28f9ff02..1ec859eb 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -8,6 +8,7 @@ #define uwsgi_error(x) uwsgi_log("%s: %s [%s line %d]\n", x, strerror(errno), __FILE__, __LINE__); #define uwsgi_debug(x, ...) uwsgi_log("[uWSGI DEBUG] " x, __VA_ARGS__); +#define uwsgi_rawlog(x) write(2, x, strlen(x)) #define wsgi_req_time ((wsgi_req->end_of_request.tv_sec * 1000000 + wsgi_req->end_of_request.tv_usec) - (wsgi_req->start_of_request.tv_sec * 1000000 + wsgi_req->start_of_request.tv_usec))/1000