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


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

Use logging level across application and modules

Started byJason Friedman <jason@powerpull.net>
First post2012-02-03 01:04 +0000
Last post2012-02-03 01:04 +0000
Articles 1 — 1 participant

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


Contents

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

#19815 — Use logging level across application and modules

FromJason Friedman <jason@powerpull.net>
Date2012-02-03 01:04 +0000
SubjectUse logging level across application and modules
Message-ID<mailman.5382.1328231075.27778.python-list@python.org>
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?

[toc] | [standalone]


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


csiph-web