Are you setting up logging explicitly?

uWSGI doesn’t automatically set up Python logging when you provide it a paster 
ini file, how are you starting uWSGI?

Bert

> On Jan 19, 2017, at 08:08, Zsolt Ero <[email protected]> wrote:
> 
> 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:
> 
> pyramid.log file is created but empty
> every log is redirected to uwsgi.log, with all custom formatters discarded.
> 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 [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pylons-discuss/6c07825a-34f5-4542-b4c2-bf7759eda509%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/pylons-discuss/6c07825a-34f5-4542-b4c2-bf7759eda509%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/8DBCF3A1-E4AF-44A2-AD98-0E7A5381DC16%400x58.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to