On 5/12/06, Simon Belak <[EMAIL PROTECTED]> wrote:
>
> Disclaimer: I am being lazy and asking here before doing any serious
> research, having said that, how does one define a custom stream for
> logging.
>
> Looking at the config file:
>
> [[handlers]]
> [[[debug_out]]]
> class='StreamHandler'
> level='DEBUG'
> args='(sys.stdout,)'
> formatter='full_content'
>
> I should probably set args to something else, but how will
> imports/namespaces be handled?
>
> Basically I want to collect all the crap that gets written to stdout.

start-foo.py > savedoutput.log

:)

Seriously, though, the "args" parameter is evaled in the context of
the logging module. (This is in line with the logging module docs.)
Since we're not using the logging module's native configuration, we
could eval somewhere else if it makes sense to do so. I have a feeling
the standard way would be to stick your stream into logging.

Kevin

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