List Info

Thread: Runtime change of logging config...




Runtime change of logging config...
country flaguser name
United States
2007-09-21 14:17:08
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 cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Runtime change of logging config...
country flaguser name
United States
2007-09-21 14:34:27
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
fumanchuaminus.org

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


  
Re: Runtime change of logging config...
country flaguser name
United States
2007-09-21 18:10:31

> 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
> fuman...aminus.org
>
>  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 cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )