On 5/16/06, Jorge Vargas <[EMAIL PROTECTED]> wrote:
> I'm writting a little app to show off logging and scheduler as well as
> provide something really nice to the comunity, and no i wont tell until i
> release it :p
Tease :)
> in a new quickstarted project how does the log object knows to which
> handlers it should write?
It's in dev.cfg. Loggers are set up with appropriate qualnames and handlers.
> what is/are the diferences of having a logger in code or having it in the
> .cfg file
> so far I have this (sorry for the wikiformatting outside of wiki), but this
> is going to trac ones it's done
There's no difference. If you look in turbogears.config, you'll see
that it takes what's in the config file and builds the objects.
> where inside turbogears are logger instances uses?
Mamy TG modules do
log = logging.getLogger("turbogears.foo")
> if I do a mix of code lvl logger objects and cfg level object and
> which will be the best way of executing a logging.addLevelName (I want to
> provide a patch so custom levels can be created, how about adding a
> [[customLevel]] where each lvl 3 will be the name with one key with the
> level #, and then use them the same way formatters are used.
Err... why? I'm not certain what custom levels really buy you, unless
there's some behavior that cannot be adequately expressed with the 4
(or is it 5?) current levels.
> which is the preferred way to have an entry in log.cfg or to load with
> loggger.getLogger.Note this logger part of my tutorial is getting so big
> i'll split it up into it's own wikipage so ones I get some answers I'll post
> it. going to start with the scheduler.
Generally, I'm trying to keep logging config in the config files.
log.cfg is for configuration that doesn't change based on deployment,
and dev/prod.cfg have the differences for different deployment
scenarios.
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
-~----------~----~----~----~------~----~------~--~---