From a3e9a288d37d66568332d4624baf0ca5f2444b9c Mon Sep 17 00:00:00 2001 From: Roberto De Ioris Date: Tue, 9 Oct 2012 06:51:14 +0200 Subject: [PATCH] better usage of uwsgi_log_initial --- core/uwsgi.c | 10 +++++----- plugins/psgi/psgi_plugin.c | 4 ++-- plugins/python/python_plugin.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/uwsgi.c b/core/uwsgi.c index d639b87d..dcc965a8 100644 --- a/core/uwsgi.c +++ b/core/uwsgi.c @@ -1971,7 +1971,7 @@ int uwsgi_start(void *v_argv) { #ifdef RLIMIT_NPROC if (uwsgi.rl_nproc.rlim_max > 0) { uwsgi.rl_nproc.rlim_cur = uwsgi.rl_nproc.rlim_max; - uwsgi_log("limiting number of processes to %d...\n", (int) uwsgi.rl_nproc.rlim_max); + uwsgi_log_initial("limiting number of processes to %d...\n", (int) uwsgi.rl_nproc.rlim_max); if (setrlimit(RLIMIT_NPROC, &uwsgi.rl_nproc)) { uwsgi_error("setrlimit()"); } @@ -1979,10 +1979,10 @@ int uwsgi_start(void *v_argv) { if (!getrlimit(RLIMIT_NPROC, &uwsgi.rl_nproc)) { if (uwsgi.rl_nproc.rlim_cur != RLIM_INFINITY) { - uwsgi_log("your processes number limit is %d\n", (int) uwsgi.rl_nproc.rlim_cur); + uwsgi_log_initial("your processes number limit is %d\n", (int) uwsgi.rl_nproc.rlim_cur); if ((int)uwsgi.rl_nproc.rlim_cur < uwsgi.numproc+uwsgi.master_process) { uwsgi.numproc = uwsgi.rl_nproc.rlim_cur - 1; - uwsgi_log("!!! number of workers adjusted to %d due to system limits !!!\n", uwsgi.numproc); + uwsgi_log_initial("!!! number of workers adjusted to %d due to system limits !!!\n", uwsgi.numproc); } } } @@ -1991,7 +1991,7 @@ int uwsgi_start(void *v_argv) { if (uwsgi.rl.rlim_max > 0) { uwsgi.rl.rlim_cur = uwsgi.rl.rlim_max; - uwsgi_log("limiting address space of processes...\n"); + uwsgi_log_initial("limiting address space of processes...\n"); if (setrlimit(RLIMIT_AS, &uwsgi.rl)) { uwsgi_error("setrlimit()"); } @@ -2007,7 +2007,7 @@ int uwsgi_start(void *v_argv) { } else { - uwsgi_log("scheduler priority set to %d\n", uwsgi.prio); + uwsgi_log_initial("scheduler priority set to %d\n", uwsgi.prio); } } if (!getrlimit(RLIMIT_AS, &uwsgi.rl)) { diff --git a/plugins/psgi/psgi_plugin.c b/plugins/psgi/psgi_plugin.c index 7e6425a0..3d057a5e 100644 --- a/plugins/psgi/psgi_plugin.c +++ b/plugins/psgi/psgi_plugin.c @@ -370,9 +370,9 @@ int uwsgi_perl_init(){ } #ifdef PERL_VERSION_STRING - uwsgi_log("initialized Perl %s main interpreter at %p\n", PERL_VERSION_STRING, uperl.main[0]); + uwsgi_log_initial("initialized Perl %s main interpreter at %p\n", PERL_VERSION_STRING, uperl.main[0]); #else - uwsgi_log("initialized Perl main interpreter at %p\n", uperl.main[0]); + uwsgi_log_initial("initialized Perl main interpreter at %p\n", uperl.main[0]); #endif return 1; diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c index 2eeeee32..b12c8ce7 100644 --- a/plugins/python/python_plugin.c +++ b/plugins/python/python_plugin.c @@ -226,7 +226,7 @@ pep405: Py_Initialize(); if (!uwsgi.has_threads) { - uwsgi_log("*** Python threads support is disabled. You can enable it with --enable-threads ***\n"); + uwsgi_log_initial("*** Python threads support is disabled. You can enable it with --enable-threads ***\n"); } up.wsgi_spitout = PyCFunction_New(uwsgi_spit_method, NULL);