Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #35752 > unrolled thread

Re: Facing issue with Python loggin logger for printing object value

Started byDave Angel <d@davea.name>
First post2012-12-29 11:41 -0500
Last post2012-12-29 11:41 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Facing issue with Python loggin logger for printing object value Dave Angel <d@davea.name> - 2012-12-29 11:41 -0500

#35752 — Re: Facing issue with Python loggin logger for printing object value

FromDave Angel <d@davea.name>
Date2012-12-29 11:41 -0500
SubjectRe: Facing issue with Python loggin logger for printing object value
Message-ID<mailman.1427.1356799337.29569.python-list@python.org>
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.
     http://docs.python.org/2/library/logging
"""Logger.setLevel(lvl)
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:
    http://docs.python.org/dev/howto/logging
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.



-- 

DaveA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web