Runtime change of logging config...

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Runtime change of logging config...

venkatbo-2

Hi,

For example, assume there is config like this:

--------------
...
[logging]
[[formatters]]
[[[message_only]]]
format='*(message)s'
...

[[handlers]]
...
[[[access_out]]]
class='StreamHandler'
level='INFO'
## args='(sys.stdout,)'
formatter='message_only'

[[[error_out]]]
class='StreamHandler'
level='ERROR'
## args='(sys.stdout,)'
....
--------------

Rather than specifying the info for "args" here, I'd like to
specify it in the application during init (priot to setting up
the logger etc). In this hierarchical config scenario:
    [logging]  -->  [[handlers]]  --> [[[access_out]]] --> ...
and
    [logging]  -->  [[handlers]]  --> [[[error_out]]] --> ...
how can one use onfig.update() to "update" the "args"
config at runtime - ensuring there is no namespace
collision between both the cases.

Thanks,
/venkat


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

Reply | Threaded
Open this post in threaded view
|

Re: Runtime change of logging config...

Robert Brewer-4
venkatbo wrote:

> For example, assume there is config like this:
>
> [logging]
> [[formatters]]
> [[[message_only]]]
> format='*(message)s'
> ...
> how can one use onfig.update() to "update" the "args"
> config at runtime - ensuring there is no namespace
> collision between both the cases.
That's some lovely TG config you've got there, not CP config.
And TG does its own logging separate from CP. You should ask
on a TG mailing list.


Robert Brewer
[hidden email]

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


winmail.dat (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Runtime change of logging config...

venkatbo-2


> That's some lovely TG config you've got there, not CP config.
> And TG does its own logging separate from CP. You should ask
> on a TG mailing list.

I did post the question there, earlier... Got no feedback...
And checking the TG-config module further, appears to
incdicate it uses the services of cherrypy.confg to store
the config... So thought some here can help with hierarhical
config updates.

Thanks,
/venkat

>
> Robert Brewer
> [hidden email]
>
>  winmail.dat
> 3KDownload


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