Thanks Diez,

The bizarre thing is (and I found this out just moments after sending my
email) that the logging -- with the *same* config file-- works just fine
from the command line (I'm using ipython...)

I'll give your recommendation a shot and report back.

Regards,
Rob



On 14 July 2010 19:06, Diez B. Roggisch <[email protected]> wrote:

>
> Am 14.07.2010 um 18:35 schrieb Robert Sudwarts:
>
>
>  Hi,
>>
>> Wonder if anyone can help with this.  I've just upgraded my sqlalchemy
>> from v0.5.8 to v0.6.2 and the logging module no longer seems to work...
>>
>> I've made *no* changes to the .ini/config file,  and I'm still getting log
>> info from [tg.i18n] but nothing from the database.
>>
>> I've attached the essential bits of the .ini file below and would be happy
>> to send any other details which might be needed.
>>
>> Grateful for any help....
>>
>>
>>
>> ----------------------------------------------------------------------------------------------------------------
>> [loggers]
>> keys = root, model, sqlalchemy, auth
>>
>> [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.)
>>
>
> the python logging has the rather nasty habit of de-activating loggers or
> handlers if it is re-configured. It might just be that sqlalchemy configures
> itself somehow on import, and then once paster configures logging again, the
> sqlalchemy-stuff is essentially dead.
>
> To verify this, I suggest you
>
>  - obtain a logger from sqlalchemy. Something like
>
>
> logger = logging.getLogger("sqlalchemy")
>
> should work. Then, log something with that logger on a guaranteed logged
> level, such as ERROR.
>
> And source-debug that.
>
> All of this would happen inside an action of course. If you find that the
> logger or handler is "disabled", then you know that is the problem. For our
> testsystem, we have code that re-enables all registered logger instances
> because of similar issues. Put that code into some stuff run at startup,
> such as middleware.py.
>
> And of course it might be worth taking this to the SA-ML & file it as bug.
> No package should configure itself.
>
> Diez
>
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<turbogears%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/turbogears?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to