> The logging FAQ states "Therefore, when using Python logging, ensure
> all echo flags are set to False at all times, to avoid getting
> duplicate log lines."
> http://www.sqlalchemy.org/docs/dbengine.html#configuring-logging
>
> Is this no longer correct information?
it is correct
>
> I am using turbogears (which creates the engine with
> engine_from_config()) and with the config file like this:
>
> sqlalchemy.echo = false
> sqlalchemy.echo_pool = false
> sqlalchemy.pool_recycle = 3600
>
> I cannot get engine logging no matter what I put in the logging config
> file. echo is turned off and sqlalchemy won't even hit the
> logger.debug() method.
assuming you're on the pylons version of turbogears, you leave the echo flags alone. You configure logging in the [logging] section of your .ini file, using loggers and log levels. I use Pylons and this all works very well.
================================
#echo shouldn't be used together with the logging module.
sqlalchemy.echo = false
sqlalchemy.echo_pool = false
sqlalchemy.pool_recycle = 3600
...logging sections...
================================
Instead, its default .ini file should leave the flag alone.
I've directed TG group to this thread, thanks for your help.