Menu

Help with Removing Debugging Messages

Help
angelites
2005-03-03
2013-06-05
  • angelites

    angelites - 2005-03-03

    Hi Ben,

    Is there any way to prevent the debugging messages from appearing on the stdout whenever i call CalendarOutputter and such? It is sorta interfering with my own debugging process (can't see my own messages...)

    And another thing, regarding the changes to VFreeBusy you did the other time to remove the NullPointerException, may I have a look at the new source code? Cos I am trying out the VFreeBusy at the moment.

    Thank you very much!

     
    • Ben Fortuna

      Ben Fortuna - 2005-03-03

      angelites,

      You need to configure your logging to only output DEBUG messages for your own packages/classes.

      For example, if you are using log4j you can use a configuration file to ouput debug messages in your own code and error messages in everything else like this:

      log4j.logger.rootLogger=error, stdout
      log4j.logger.com.example.bar.foo=debug, stdout

      Alternatively if you just want to supress the iCal4j messages you could add the following line to your configuration file:

      log4j.logger.net.fortuna.ical4j=error, stdout

      For a complete example, there is a log4j.properties in the test directory of the iCal4j source distribution.

      The only thing I've changed at this stage to avoid that NullPointerException is in the VFreeBusy.createFreeTime() method I check for a null end date when looping through the periods. i.e:

      if (period.getStart().after(end) || (period .getEnd() != null && period.getEnd().before(start)) {
        ...
      }

      This is to allow for periods that have a duration rather than an end date.

      You can make this change yourself if you like. I'm in the middle of a move so I haven't been able to update CVS just yet..

      regards,
      ben

       

Log in to post a comment.