Remove the console from handlers on logger_project_name as that logger is configured to propagate logs up the tree, meaning the root is logging it as well.
On Sun, Jul 23, 2017 at 1:54 PM, Srikanth Bemineni < bemineni.srika...@gmail.com> wrote: > Hi, > > Every message that I log for debugging purpose are logged twice on the > console. I am using the pyramid 1.8.3 with uwsgi running 4 instances during > development. All sqlalchemy messages are logged only once > > 2017-07-23 13:38:28,090 INFO [project_name:69][b'uWSGIWorker1Core0'] > Starting wsgi server > 2017-07-23 13:38:28,090 INFO [project_name:69][b'uWSGIWorker1Core0'] > Starting wsgi server > 2017-07-23 13:38:26,997 INFO > [project_name.views.session:62][b'uWSGIWorker1Core0'] > b'$2b$12$k27v8mo../Re09lTmQ34WO' > 2017-07-23 13:38:26,997 INFO > [project_name.views.session:62][b'uWSGIWorker1Core0'] > b'$2b$12$k27v8mo../Re09lTmQ34WO' > > In development.ini > > [loggers] > keys = root, project_name, sqlalchemy > > [handlers] > keys = console > > [formatters] > keys = generic > > [logger_root] > level = INFO > handlers = console > > [logger_project_name] > level = DEBUG > handlers = console > qualname = project_name > > [logger_sqlalchemy] > level = INFO > handlers = > qualname = sqlalchemy.engine > # "level = INFO" logs SQL queries. > # "level = DEBUG" logs SQL queries and results. > # "level = WARN" logs neither. (Recommended for production systems.) > > In main project __init__.py > > logging.config.fileConfig(settings["logging.config"], > disable_existing_loggers=False) > log = logging.getLogger(__name__) > > Does getLogger create another logger ?? > > -- > 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-discuss+unsubscr...@googlegroups.com. > To post to this group, send email to pylons-discuss@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/pylons-discuss/e72dd164-a66f-4747-8dc2-15d93b0526f4% > 40googlegroups.com > <https://groups.google.com/d/msgid/pylons-discuss/e72dd164-a66f-4747-8dc2-15d93b0526f4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > 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 pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAKdhhwFomzS8e9Z-nPOa_3RorWsAvmgKKWUBiO2iG7%2BT1oXtpA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.