Facing issue with Python loggin logger for printing object value

Dave Angel d at davea.name
Sat Dec 29 17:41:44 CET 2012

On 12/29/2012 07:39 AM, Morten Engvoldsen wrote:
> Hi Dave,
> Thanks for reply. I will really appreciate if you reply to my mail id and
> keep python list in cc, since everytime you reply my query i need to search
> the reply in the forwarding message of python list.

I won't be able to remember to special-case your account, but maybe for
the next few days.  Far too many others have complained when they get an
email directly, either by sending me a request message, by using an
address at the "invalid" domain, by hijacking some bogus email address,
or by having an autoreply that says "Please don't try to contact me at
this address".  For a while I considered adding all such people to a
kill-file, but decided I'd miss too much.

I suggest you get used to reading all messages, or to simply following
the thread.  (For example, Thunderbird can keep all messages together
which are replies to each other) And while I've got you, it'd be nice if
you used reply-list yourself, instead of starting a new thread each time.

> Using logger.setLevel(logging.DEBUG) will log only debug message in the log
> file and discard other message from log file. So that's not solving the
> issue of my problem. I am looking into code to find out the issue.

That's not what setLevel() does.  It's a >= comparison, not an == one.
Sets the threshold for this logger to lvl. Logging messages which are
less severe than lvl will be ignored."""

Perhaps you should also read the page:
search for the phrase " increasing order of severity" where it lists the
5 levels, in order.  The default level for the root logger is WARNING,
so it ignores DEBUG and INFO messages.  I suggested changing it to
DEBUG, so those won't get ignored.

You probably need to write a 10-line self-contained program to
experiment with this, and run it outside of openerp.  Chances are
openerp is doing something special that you need to conform to.  But I'm
not going to be able to guess that.



More information about the Python-list mailing list