Hi Dave, Thanks a lot for your reply. I have used logging.setLevel(logger.DEBUG) because of threshold as you said.
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 : for payment in payment_line: 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. Thanks again... :) On Sat, Dec 29, 2012 at 5:41 PM, Dave Angel <d...@davea.name> wrote: > 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 >
-- http://mail.python.org/mailman/listinfo/python-list