Menu

Sphinx logging

Help
Jim
2004-10-15
2012-09-22
  • Jim

    Jim - 2004-10-15

    I need to "take-over" all logging done by Sphinx for both formatting and output target reasons and really don't want to make any coding changes to Sphinx4.

    I have found references to loger.properties, logger.props, and the java logging.properties file but have had no succces in getting my formatter and filter activated.

    I have also noticed the the ConfigurationManager (configureLogger) does some things with properties related to logging the intent of which I can't decipher.

    How do I override the Sphinx4 logging to use my own formatter and filter?

    Also I noticed some amount of direct use of System.err and System.out. Is there any plan to convert this to logging?

    Jim

     
    • Paul Lamere

      Paul Lamere - 2004-10-15

      Jim:

      We've gone through a couple of iterations on logging in sphinx-4. The references to logger.props are vestigial and are no longer valid. All configuration of logging is done through the sphinx4 config.xml mechanism. We did this to simplify configuring the logger. In our first attempt at using the logger we found the logger.props mechanism to be confusing enough that we usually didn't use it. To alleviate this we simplified the logging model by putting the configuration into the sphinx config on a component by component method. However, by doing so we've lost some of the flexibility of the full logger.
      It would be possible to add support for configuring the formatter and handler. However at the current time I don't think there's anyway to set your own formatter and filter.

      Any calls to System.err and System.out in the main engine code (not in the demos or main line drivers) should be considered a bug and will be dealt with in a future release.

      Paul

       

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.