Custom handler for logging

Discussion in 'Python' started by Luigi Paioro, Sep 3, 2008.

  1. Luigi Paioro

    Luigi Paioro Guest

    Dear all,

    concerning the logging module, I have written a new Handler which stores
    the logging messages in an SQLite database. It works well, but when I
    try to use it exploiting a configuration file I have a problem since the
    "class" entry does not accept a class which is not within the logging
    name-space, while the class I implemented is coded in my personal module
    (thus another name-space).

    Is there a workaround to allow the usage of custom handlers?

    Thanks in advance.

    Luigi
     
    Luigi Paioro, Sep 3, 2008
    #1
    1. Advertising

  2. Luigi Paioro

    Peter Otten Guest

    Luigi Paioro wrote:

    > concerning the logging module, I have written a new Handler which stores
    > the logging messages in an SQLite database. It works well, but when I
    > try to use it exploiting a configuration file I have a problem since the
    > "class" entry does not accept a class which is not within the logging
    > name-space, while the class I implemented is coded in my personal module
    > (thus another name-space).
    >
    > Is there a workaround to allow the usage of custom handlers?


    Maybe

    http://mail.python.org/pipermail/python-list/2003-October/232762.html

    Peter
     
    Peter Otten, Sep 3, 2008
    #2
    1. Advertising

  3. Luigi Paioro

    Luigi Paioro Guest

    Thanks, it works perfectly!

    Luigi

    Peter Otten ha scritto:
    > Luigi Paioro wrote:
    >
    >> concerning the logging module, I have written a new Handler which stores
    >> the logging messages in an SQLite database. It works well, but when I
    >> try to use it exploiting a configuration file I have a problem since the
    >> "class" entry does not accept a class which is not within the logging
    >> name-space, while the class I implemented is coded in my personal module
    >> (thus another name-space).
    >>
    >> Is there a workaround to allow the usage of custom handlers?

    >
    > Maybe
    >
    > http://mail.python.org/pipermail/python-list/2003-October/232762.html
    >
    > Peter
     
    Luigi Paioro, Sep 3, 2008
    #3
    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. shruds
    Replies:
    1
    Views:
    960
    John C. Bollinger
    Jan 27, 2006
  2. Frank Aune
    Replies:
    4
    Views:
    1,214
    Vinay Sajip
    Oct 19, 2007
  3. Gal Aviel
    Replies:
    1
    Views:
    487
    Gerard Flanagan
    Mar 4, 2008
  4. Lowell Alleman
    Replies:
    3
    Views:
    557
    Vinay Sajip
    May 29, 2008
  5. MichaelS
    Replies:
    0
    Views:
    454
    MichaelS
    Nov 22, 2006
Loading...

Share This Page