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


Groups > comp.lang.python > #35754

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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.87.MISMATCH!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <mortenengv@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'value,': 0.03; 'messages.': 0.04; 'root': 0.04; 'subject:Python': 0.05; 'debug': 0.05; 'discard': 0.05; 'python': 0.09; '&quot;': 0.09; '&quot;please': 0.09; 'logger': 0.09; 'other)': 0.09; 'threshold': 0.09; 'cc:addr:python-list': 0.10; 'thread': 0.11; 'suggest': 0.11; 'dec': 0.15; 'sat,': 0.15; 'complained': 0.16; 'ignores': 0.16; 'levels,': 0.16; 'log.': 0.16; 'said.': 0.16; 'subject:issue': 0.16; 'subject:object': 0.16; 'thread.': 0.16; 'wrote:': 0.17; 'url:dev': 0.17; 'issue.': 0.20; 'suggested': 0.20; 'file.': 0.20; 'trying': 0.21; 'object.': 0.22; "i'd": 0.22; 'cc:2**0': 0.23; '&gt;': 0.23; 'ignored.': 0.23; 'sets': 0.23; "i've": 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'skip:" 20': 0.26; 'am,': 0.27; 'guess': 0.27; 'logging': 0.27; 'order.': 0.27; 'message-id:@mail.gmail.com': 0.27; 'reply.': 0.28; 'run': 0.28; '"please': 0.29; 'directly,': 0.29; 'skip:& 10': 0.29; 'probably': 0.29; "i'm": 0.29; 'maybe': 0.29; 'that.': 0.30; 'query': 0.30; 'skip:& 30': 0.30; 'lists': 0.31; 'code': 0.31; 'problem.': 0.32; 'url:python': 0.32; 'file': 0.32; 'info': 0.32; 'says': 0.33; 'messages,': 0.33; 'much.': 0.33; 'null': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'list': 0.35; 'skip:l 30': 0.35; 'solving': 0.35; 'doing': 0.35; 'pm,': 0.35; "won't": 0.35; 'received:209.85': 0.35; 'something': 0.35; 'next': 0.35; 'list.': 0.35; 'really': 0.36; 'but': 0.36; 'url:org': 0.36; 'url:library': 0.36; "didn't": 0.36; 'subject:with': 0.36; 'should': 0.36; 'too': 0.36; 'level': 0.37; '(for': 0.37; 'received:209': 0.37; 'far': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'url:docs': 0.38; 'instead': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'your': 0.60; 'address': 0.60; 'here': 0.65; 'decided': 0.65; 'reply': 0.66; 'contact': 0.68; 'special': 0.73; 'miss': 0.75; 'increasing': 0.75; 'yourself,': 0.75; 'address,': 0.79; 'domain,': 0.84; 'experiment': 0.84; "it'd": 0.84; 'subject:printing': 0.84; 'subject:value': 0.84; '\xa0but': 0.84; 'severe': 0.91; 'angel': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7+siojAHLILRn2O7tWHnQjmdINSKUkJhN6kZ7y9MOYs=; b=oUw9/IP+zxEld0O0lGTjIaxt/Sq0+vd1pEBxZ/U+oFzzvhINITDkXY7//HDQTkNWRx WZilWwtxwLqZOh6+b8wpgD5aA95tZaBx0cAmdbozS959UXIy1RNqBhszF+KWEa7/XKes n1cxhBlU8t6+UMawvJ3ekbT91C+ZLsGes/65yctzaGBqK71VJq+U3RmzMdFbV8v54bIj PxaQtI3WGpZlb1kbNhS0Lp7kKb/c4hwwUiHxd1q4hiDCDSiLaMKUDUDdDKEOHA/LxWTp /Xd58zxCOJeKXSv5nbMqu8NHHU/n2Zv6pS3VMcFdtOF7KGOCjdE0ei1MjbLUKiq4UWL4 L4kw==
MIME-Version 1.0
In-Reply-To <50DF1D48.2060507@davea.name>
References <CAJ2vgs6aDNFfrm+F7fRrBiE10naNQRKW_dwVGzM8BxCR9ws3Kw@mail.gmail.com> <50DF1D48.2060507@davea.name>
Date Sat, 29 Dec 2012 17:54:33 +0100
Subject Re: Facing issue with Python loggin logger for printing object value
From Morten Engvoldsen <mortenengv@gmail.com>
To d@davea.name
Content-Type multipart/alternative; boundary=14dae9340dd56c24ec04d200a2ea
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1428.1356800081.29569.python-list@python.org> (permalink)
Lines 165
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1356800081 news.xs4all.nl 6943 [2001:888:2000:d::a6]:47007
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:35754

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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
>

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Facing issue with Python loggin logger for printing object value Morten Engvoldsen <mortenengv@gmail.com> - 2012-12-29 17:54 +0100

csiph-web