On Dec 9, 5:14 pm, Jorge Godoy <[EMAIL PROTECTED]> wrote:
> Em Sunday 09 December 2007 11:54:14 Ben Sizer escreveu:
>
> > But is this the same object as above then? Neither the TG or the
> > Python docs are clear on this. I don't understand what this string
> > parameter corresponds to, if anything. The implication is that you get
> > given a logger with that name, but that name doesn't match any of the
> > logger names given in the ,cfg file, so what would you get? It's all
> > very confusing!
>
> There was a "testing123" on the configuration.  It matches that one.

Ok, so what's the difference between:
    log = logging.getLogger('testing123')
and
    log = logging.getLogger('testing123.module_name')

If they both get testing123, then why does the Python documentation
imply that you get a different logger if you supply a different name?
It's not very clear just what that name does. Why add the extra bit?
The docs talk about a hierarchical structure, but what does it
actually mean in this context?

> > Is that one? It looks more like three! It seems like there isn't a
> > consistent definition of what a 'logger' is.
>
> Three?

The config file has a section called [[loggers]]. It has 3 entries.
Therefore, it makes sense to assume there are 3 loggers. But all the
examples seem to expect you to just get one. It's not clear. Do you
refer to them by different names? If so, why does a quick start
project create them, and under what circumstances do you use the
others? And does the hierarchical naming system apply to these - is
that how you can access the first one when you use a name that only
prefix-matches it?

Oh, and comments in the docs like "(note the missing qualname)" with
no explanation of why we're supposed to note that just serve to really
confuse matters.

I'm sure this is simple once you understand it, but it's actually
quite confusing to try and read through all these things and try to
work out what it's actually referring to. The documentation (not just
TG, Python's too) is very vague.

--
Ben Sizer

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to