Hi, Succintly: What's the correct way to set up logging in SQLAlchemy 0.5.2 ??
The docs say simply set the logger level correctly. However I notice in the source that most classes make a check on _should_log_info (which is set during __init__) before deciding whether to call the logger. This has the effect of ignoring changes to the log level made after the object was created. Specifically, this code does not work as expected: _engine = create_engine(config.options.orm_url) _engine.echo = False logging.getLogger("sqlalchemy.engine").setLevel(logging.DEBUG) logging.getLogger("sqlalchemy.engine").isEnabledFor(logging.DEBUG) # == True but logging still doesn't happen So is there a solution to this? It doesn't work to simply set the log level before creating the engine since 'No handlers could be found for logger "sqlalchemy.engine.base.Engine.0x...bf34"' Thanks in advance, -- t o b e --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---