Thanks! So I added "paste-logger = true" and then I got a warning saying:
ImportError: No module named script.util.logging_config Which I found out on SO can be fixed by installing pastescript. So the combination of paste-logger = true + pastescript in requirements seems to have fixed it! On 19 January 2017 at 18:42, Bert JW Regeer <[email protected]> wrote: > You’ll need something like: > > paste-logger = %p > > As well for uWSGI to automatically pick up your logger configuration from > .ini file: > http://uwsgi-docs.readthedocs.io/en/latest/Options.html?highlight=paste-logger#paste-logger > > uWSGI doesn’t automatically pick up your fileConfig logging otherwise. > > (Basically unless you explicitly call fileConfig for your .ini right now > uWSGI doesn’t do anything with your logging handlers/information) > > > On Jan 19, 2017, at 10:17, Zsolt Ero <[email protected]> wrote: > > I'm just simply calling uwsgi uwsgi.ini and and it has the logto line in > there. > > On 19 January 2017 at 18:16, Bert JW Regeer <[email protected]> wrote: > > 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]. > 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/6c07825a-34f5-4542-b4c2-bf7759eda509%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > > -- > 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 > [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. > > > -- > 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/CAKw-smCoGqReO7N7mBcbZH4yC2bft0LtW%3DPZdTd9rsWj7O-M4Q%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. > > > -- > 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 > [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/2D18C5AC-B027-4DF2-B298-AB9F5480449A%400x58.com. > > For more options, visit 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/CAKw-smBHZv1FHUENF%2BvCE%3DZ3Vr9tdy4jOff6UKhGjuuf5ZhJ3w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
