On Sep 30, 1:20 pm, Russell Keith-Magee <freakboy3...@gmail.com>
wrote:
>
> I was thinking that a calming, motherly "there there, it's all right,
> the boogeymonster isn't real" would do the trick  :-)

I'll see what I can do...

>
> I suppose this is a big part of the problem. The logging module isn't
> a trivial API, and you really need to understand how it works before
> you can use it effectively. What is needed is a really good tutorial;
> what we have is a reference guide with a little bit of a tutorial
> tacked on the front. The reference is needed, but the tutorial is much
> more important from the point of view of getting the message out and
> encouraging people to use the API.
>

You're absolutely right about this. Hopefully working on this with
Doug Hellmann (from whose PyMOTW the initial tutorial bits came) will
yield some improvements.

> >http://plumberjack.blogspot.com/2009/09/python-logging-101.html
>
> I saw this, and yes, it's a good start. However, it (or a version of
> it) needs to be formalized and in the official docs, not lingering on
> a blog somewhere.

You're right, and that will (hopefully) happen at some point not too
far in the future.

> Agreed, it's important that the simple use case is demonstrated.
> However, in the docs, the simple example is then used as a staging
> ground for demonstrating rotating file loggers and other things that a
> simple example doesn't need.
>
> Logging is a complex topic. A simple example doesn't provide the
> complexity that is required to demonstrate the strengths of the API.
> The simple example is useful for demonstrating the "hello world" case,
> but not for demonstrating more complex features.

I get it now, thanks for clarifying.

> On the subject of examples, another suggestion: I'm wary of examples
> that try to be too smart. Take the logging level demonstration (the
> 5th code snippet in 16.6.1.1). This code very cleverly writes a script
> that can take a command line argument and turn it into a logging
> level, but in being clever, it obscures the point of the example -
> that you can output log messages at any level, but the configuration
> determines which ones are output. When you're trying to demonstrate
> the simple stuff, the less extraneous detail, the better. The next
> example (which demonstrates multiple loggers) is much clearer - it's
> obvious from first inspection what the code is doing.

Okay. I'll see about sorting this out as part of a larger makeover.

> To avoid a dependency on the logging module, thereby keeping Adrian happy :-)
>
> Seriously - I really do want to find out the nature of Adrian's
> objection to logging (if it is even current). I'd rather have an
> actual discussion than dance around a strawman.

It would perhaps be a problem if it was an external dependency, rather
than an integral part of Python. You're right, though - let's see what
he has to say.

Regards,

Vinay Sajip
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to