One more suggestion :)

As of right now, I am unable to use the more advanced logging handlers like the TimedRotatingFileHandler.  This is because these classes do not exist in the base logging package (it is in the logging.handlers package).  When turbogears/config.py attempts to configure the handler, it fails when any class in the handlers package is specified.

The fix is quite simple.  Adding 'import logging.handlers' after 'import logging' in turbogears/config.py remedies the situation.  After this is done, one can access the more advanced handlers by doing the following:

[[[access_out]]]
# set the filename as the first argument below
args="('server.log','M',1,4)"
class='handlers.TimedRotatingFileHandler'   #<-- Needs to specfy "hanlders"
level='INFO'
formatter='full_content'

So far, the only side effect I see from making this change is that the turbogears.access handler in sample-prod.cfg may need to be changed as follows:

[[[access]]]
level='INFO'
qualname='turbogears'  <-- #changed from turbogears.access
handlers=['access_out']
propagate=0

The reason for the change is that turbogears.visit is not configured, so if you want to capture that information, either a new section needs to be created for turbogears.visit, or the qualname for the 'access' logger needs to be shortened to just 'turbogears'.

Thanks,

Sean

On 5/12/06, Kevin Dangoor <[EMAIL PROTECTED]> wrote:

On 5/12/06, Sean De La Torre < [EMAIL PROTECTED]> wrote:
> [[[access_out]]]
> # set the filename as the first argument below
> args="('server.log',)"
> class='FileHandler'    #<--- Changed from 'StreamHandler'
> level='INFO'
> formatter='message_only'

Fixed in [1481]. Thanks!





--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to