Use logging level across application and modules

Discussion in 'Python' started by Jason Friedman, Feb 3, 2012.

  1. 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?
     
    Jason Friedman, Feb 3, 2012
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    586
  2. mike
    Replies:
    1
    Views:
    1,873
    Martin Honnen
    Nov 20, 2004
  3. metaperl
    Replies:
    6
    Views:
    430
    metaperl
    Sep 23, 2006
  4. =?Utf-8?B?SmVmZiBUdQ==?=

    Highlighting selected level 1 and level 2 menu items

    =?Utf-8?B?SmVmZiBUdQ==?=, Jan 27, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    707
    Thomas Hansen
    Jan 27, 2007
  5. pabbu
    Replies:
    8
    Views:
    973
    Marc Boyer
    Nov 7, 2005
  6. Scorpiion
    Replies:
    1
    Views:
    1,602
    Scorpiion
    Dec 25, 2008
  7. Jéjé
    Replies:
    0
    Views:
    367
    Jéjé
    Sep 27, 2005
  8. Replies:
    2
    Views:
    196
    Steven D'Aprano
    Nov 3, 2013
Loading...