From 95f15ab9ddbbd0496f1c592c4ecb054f08c681a2 Mon Sep 17 00:00:00 2001 From: Unbit Date: Sun, 2 Jun 2013 19:20:35 +0200 Subject: [PATCH] added a note for python logger --- plugins/python/python_plugin.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c index 4fbdcd86..d59a232b 100644 --- a/plugins/python/python_plugin.c +++ b/plugins/python/python_plugin.c @@ -1756,7 +1756,12 @@ void uwsgi_python_harakiri(int wid) { } } - +/* + # you can use this logger to offload logging to python + # be sure to configure it to not log to stderr otherwise you will generate a loop + import logging + logging.basicConfig(filename='/tmp/pippo.log') +*/ ssize_t uwsgi_python_logger(struct uwsgi_logger *ul, char *message, size_t len) { if (!Py_IsInitialized()) return -1;