<div>Hi Dave,</div><div>Thanks a lot for your reply. I have used logging.setLevel(logger.DEBUG) because of threshold as you said.</div><div> </div><div>I didn't copy paste the entire program since it was very huge. The "batch " which value i am trying to retrieve is in a a for loop :</div>
<div> </div><div>for payment in payment_line:</div><div> </div><div>but here payment_line has null value since it was not able to retrieve payment line value from the payment object. So i would like to know if payment_line has null value, will it be enter into for loop since i was able to log message which is  before the for loop but the message inside the for loop i am not able to log.</div>
<div> </div><div>Thanks again... :) <br><br></div><div class="gmail_quote">On Sat, Dec 29, 2012 at 5:41 PM, Dave Angel <span dir="ltr"><<a href="mailto:d@davea.name" target="_blank">d@davea.name</a>></span> wrote:<br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div class="im">On 12/29/2012 07:39 AM, Morten Engvoldsen wrote:<br>

> Hi Dave,<br>
> Thanks for reply. I will really appreciate if you reply to my mail id and<br>
> keep python list in cc, since everytime you reply my query i need to search<br>
> the reply in the forwarding message of python list.<br>
<br>
</div>I won't be able to remember to special-case your account, but maybe for<br>
the next few days.  Far too many others have complained when they get an<br>
email directly, either by sending me a request message, by using an<br>
address at the "invalid" domain, by hijacking some bogus email address,<br>
or by having an autoreply that says "Please don't try to contact me at<br>
this address".  For a while I considered adding all such people to a<br>
kill-file, but decided I'd miss too much.<br>
<br>
I suggest you get used to reading all messages, or to simply following<br>
the thread.  (For example, Thunderbird can keep all messages together<br>
which are replies to each other) And while I've got you, it'd be nice if<br>
you used reply-list yourself, instead of starting a new thread each time.<br>
<div class="im"><br>
><br>
> Using logger.setLevel(logging.DEBUG) will log only debug message in the log<br>
> file and discard other message from log file. So that's not solving the<br>
> issue of my problem. I am looking into code to find out the issue.<br>
><br>
<br>
</div>That's not what setLevel() does.  It's a >= comparison, not an == one.<br>
     <a href="http://docs.python.org/2/library/logging" target="_blank">http://docs.python.org/2/library/logging</a><br>
"""Logger.setLevel(lvl)<br>
Sets the threshold for this logger to lvl. Logging messages which are<br>
less severe than lvl will be ignored."""<br>
<br>
Perhaps you should also read the page:<br>
    <a href="http://docs.python.org/dev/howto/logging" target="_blank">http://docs.python.org/dev/howto/logging</a><br>
search for the phrase " increasing order of severity" where it lists the<br>
5 levels, in order.  The default level for the root logger is WARNING,<br>
so it ignores DEBUG and INFO messages.  I suggested changing it to<br>
DEBUG, so those won't get ignored.<br>
<br>
You probably need to write a 10-line self-contained program to<br>
experiment with this, and run it outside of openerp.  Chances are<br>
openerp is doing something special that you need to conform to.  But I'm<br>
not going to be able to guess that.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
<br>
DaveA<br>
</font></span></blockquote></div><br>