Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > logging: handle everything EXCEPT certain loggers

Thread Tools

logging: handle everything EXCEPT certain loggers

Gábor Farkas
Posts: n/a

is there a way to setup log-handlers in a way that they log logs from
every logger, exept certain ones?

basically i want the handler to handle everything, except log-records
that were generated by loggers from "something.*"
can this be done?

i tried to create filters, but the log-record does not have access to
his logger, so i cannot filter based on it's "path".

right now the only idea i have is to setup a filter for the
"something.*" path, have it mark somehow the log-records,
and then create a filter on the global level, that will drop such
log-records. is there a simpler solution?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic Question about Loggers, Parent Loggers, and Levels Rhino Java 8 04-30-2010 10:20 PM
What is the difference between 'except IOError as e:' and 'except Peng Yu Python 1 11-18-2009 02:38 AM
try -> except -> else -> except? David House Python 2 07-06-2009 05:48 PM
who is simpler? try/except/else or try/except Fabio Z Tessitore Python 5 08-13-2007 12:52 AM
converting a nested try/except statement into try/except/else John Salerno Python 20 08-11-2006 02:48 PM