I believe this is uWSGI specific, and might even be a bug in uWSGI, but since many people are using uWSGI with Pyramid here, I'd be interested to know how did you solve it.
I've migrated a project from Gunicorn to uWSGI. My problem is that my previously set-up file-based logging is all bypassed / redirected now with custom format discarded.
Previously it wrote to pyramid.log (and any other specific logs I had). Now, after converting to uWSGI:
How can I make uWSGI not overwrite the whole, carefully set-up Python logging system, and only output it's own log to uwsgi.log?
my uwsgi.ini:
[uwsgi]
paste = config:/home/app/web/app_web/production.ini
http-socket = :5000
uid = app
gid = app
master = true
processes = 16
enable-threads = true
harakiri = 60
harakiri-verbose = true
single-interpreter = true
die-on-term = true
vacuum = true
disable-logging = true
logto2 = /shared/logs/CURRENT/app/uwsgi.log
stats = /home/app/uwsgi_stats.socket
My logging setup is as follows:
[loggers]
keys = root, app_web, sqlalchemy
[handlers]
keys = filelog_pyramid
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = filelog_pyramid
[logger_app_web]
level = WARN
handlers =
qualname = app_web
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
[handler_filelog_pyramid]
class = FileHandler
args = ('/shared/logs/CURRENT/app/pyramid.log','a')
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/6c07825a-34f5-4542-b4c2-bf7759eda509%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
paste-logger = %pTo view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAKw-smCoGqReO7N7mBcbZH4yC2bft0LtW%3DPZdTd9rsWj7O-M4Q%40mail.gmail.com.
I think the command you want in uwsgi is `ini-paste-logged` instead of `paste`
--
You received this message because you are subscribed to a topic in the Google Groups "pylons-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pylons-discuss/CO5z2MD3iA0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/d3e7d2b8-84a1-436c-aa5f-6b245afda5f7%40googlegroups.com.
I was thinking of that as well, but it implies using the same ini file, which I'd like to keep separate.