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


Groups > comp.lang.python > #19815

Use logging level across application and modules

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <jsf80238@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.038
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'modules.': 0.07; 'subject:modules': 0.09; 'argument': 0.15; 'subject:application': 0.15; 'module:': 0.16; 'subject:logging': 0.16; 'url:pastebin': 0.16; "user's": 0.18; 'sender:addr:gmail.com': 0.25; 'preferred': 0.25; 'module': 0.26; 'script': 0.28; 'message- id:@mail.gmail.com': 0.28; 'modules': 0.32; 'to:addr:python-list': 0.33; 'there': 0.33; 'match': 0.33; 'received:209.85.160.46': 0.35; 'received:mail-pw0-f46.google.com': 0.35; 'received:209.85.160': 0.35; 'however,': 0.35; 'uses': 0.36; 'to:name:python-list': 0.36; 'received:google.com': 0.37; 'another': 0.37; 'received:209.85': 0.38; 'received:209': 0.39; 'to:addr:python.org': 0.40; 'more': 0.61; 'specialized': 0.72; 'application:': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=QmNQ+YmWKwJH9Ewkx5xWW68SbU6RIidrS8EvHjrexl8=; b=s0+Fxw6utbEt35LD2TRhTUOLbL3Yp+9qQt89+U25FfXU7MWUxnWQrHGkzM2ZJHSZ2c LUrY//vYfAOv/hF9psmYcRaqXMKVxTpyMcNRMNe45sJExwwrBcCIF2ocbP4AuQYaNOPw 8yd1xjy1KtiyF5U9Q+THdcGvR12ZYUUCmBFew=
MIME-Version 1.0
Sender jsf80238@gmail.com
Date Fri, 3 Feb 2012 01:04:32 +0000
X-Google-Sender-Auth QK5AJLhPR9Cjjx400dqCVCsOeFM
Subject Use logging level across application and modules
From Jason Friedman <jason@powerpull.net>
To python-list <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
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.5382.1328231075.27778.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1328231075 news.xs4all.nl 6842 [2001:888:2000:d::a6]:35812
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:19815

Show key headers only | View raw


Base module:  http://pastebin.com/nQCG5CRC
Another module:  http://pastebin.com/FFzCCjwG
Application:  http://pastebin.com/370cWJtT

I have a module that will provide base functionality, such as logging
and authentication.
I have other specialized modules that provide additional
functionality.  One module will provide database connections, another
information about users and groups, etc.
I have an application script that uses the base module and one or more
specialized modules.

I want to allow the user to select a preferred logging level.  That is
easy to do by passing that level as an argument to base.get_logger().
However, the application also uses the other module; how do I set the
logging level there to match the user's preference?

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


Thread

Use logging level across application and modules Jason Friedman <jason@powerpull.net> - 2012-02-03 01:04 +0000

csiph-web