Answer the question
In order to leave comments, you need to log in
Python logging && uwsgi?
Hello.
I have an ngnix+uwsgi server (uwsgi version is 0.9.7.1). On this server, the pylons application is running, which is launched with an ini-config.
At the same time, logging from python via logging does not work.
The config is something like this:
[DEFAULT]
debug = false
[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 5454
scriptName = ""
[app:main]
use = egg:myporject
full_stack = true
static_files = true
permanent_store = %(here)s/myporject/public
cache_dir = %(here)s/data
beaker.session.key = myporject
beaker.session.secret = somesecret
# Logging configuration
[loggers]
keys = root, routes, myporject
[handlers]
keys = accesslog
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = accesslog
[logger_routes]
level = WARN
handlers = accesslog
qualname = routes.middleware
[logger_myporject]
level = WARN
handlers = accesslog
qualname = myporject
[handler_accesslog]
class = FileHandler
args = ('access.log','a')
level = INFO
formatter = generic
[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)- 5.5s [%(name)s] [%(threadName)s] %(message)s
datefmt = %H:%M:%S
I run uwsgi like this:
/path/uwsgi/uwsgi -H /path/env -p 4 --paste config:/path/site/myproject.ini --socket :3993 > /dev/null 2>&1 &
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question