Menu

How can I use Filter class?

2002-01-03
2002-01-03
  • Luís Marques

    Luís Marques - 2002-01-03

    I am having troubles whith Filter class, I really don't understand how it works. Could you send some example of how can i use this classe!!
    Please answer me as soon as possible..
    thank you,
    Lus Marques

     
    • Bastiaan Bakker

      Bastiaan Bakker - 2002-01-03

      Hi Luis,

      I've added a simple 'example': tests/testFilter.cpp (see http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/log4cpp/log4cpp/tests/testFilter.cpp?rev=1.1&content-type=text/vnd.viewcvs-markup\)
      This example only checks whether the chaining of filters works, to use a Filter you need to call Appender::setFilter() too.

      I also caught a bug in log4cpp/include/Filter.hh: it incorrectly declares  decide(..) abstract even though it is not. Remove the '= 0' after decide() to fix this. Maybe this is the source of your trouble.

      Good luck,

      Bastiaan

       
    • Bastiaan Bakker

      Bastiaan Bakker - 2002-01-03

      Hi Luis,

      I've added a simple 'example': tests/testFilter.cpp (see http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/log4cpp/log4cpp/tests/testFilter.cpp?rev=1.1&content-type=text/vnd.viewcvs-markup\)
      This example only checks whether the chaining of filters works, to use a Filter you need to call Appender::setFilter() too.

      I also caught a bug in log4cpp/include/Filter.hh: it incorrectly declares  decide(..) abstract even though it is not. Remove the '= 0' after decide() to fix this. Maybe this is the source of your trouble.

      Good luck,

      Bastiaan

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.