fine grain logging cotrol

Peter Otten __peter__ at web.de
Fri Mar 23 03:30:32 EDT 2007


Eric S. Johansson wrote:

[in private mail -- please don't, Eric]

> Peter Otten wrote:
> 
> > As a general direction try to understand the logging package, the
> > __new__() method (a constructor in C++), and metaclasses (a class is
> > an instance of another class which is called metaclass to avoid
> > confusion when talking about both) independently before jumping into
> > the mix.
> 
> I've spent a big chunk of the afternoon/evening and am ok with
> metaclasses.  but what has my knickers in a twist is the format
> statement.  how do I get the logger to let me fill in funcName.  I've
> tried what the docs say should work (but it doesn't)
> 
> self.__logger.info("Felis.alpha", funcName="hisss")

I don't understand. The logging package detects the function name without
user intervention. 

Perhaps it's time to step back and explain what you want to achieve rather
than how you proceed.

Peter



More information about the Python-list mailing list