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. Advertising

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. pabbu
    Replies:
    8
    Views:
    711
    Marc Boyer
    Nov 7, 2005
  2. Jéjé
    Replies:
    0
    Views:
    222
    Jéjé
    Sep 27, 2005
  3. Fábio Santos
    Replies:
    0
    Views:
    74
    Fábio Santos
    Apr 24, 2013
  4. Chris “Kwpolska†Warrick

    Re: improvements sought re. logging across modules

    Chris “Kwpolska†Warrick, Apr 24, 2013, in forum: Python
    Replies:
    0
    Views:
    73
    Chris “Kwpolska†Warrick
    Apr 24, 2013
  5. Dave Angel
    Replies:
    0
    Views:
    77
    Dave Angel
    Apr 24, 2013
Loading...

Share This Page