[xep-support] Re[2]: How to turn on quiet mode with Cocoon Serializer?

From: Alexander Peshkov (peshkov@renderx.com)
Date: Fri Feb 06 2004 - 05:55:07 PST

  • Next message: G. Ken Holman: "Re: [xep-support] initial-page-number forces blank page"

    Hello Andrzej,

    You have to create a custom logger in order to suppress all messages
    except warnings and errors or to process them with any external
    framework. Logger interface is described in Section "2.4. Logging
    Facility" of "Using XEP 3.7 in Java Applications" (applications.pdf)
    For example, this is the logger class used in XSLDriver in 'quiet' mode:

      class QuietLogger extends com.renderx.xep.lib.DefaultLogger {
        QuietLogger() { super(); }
        public void openDocument() {}
        public void closeDocument() {}
        public void event(String name, String message) {}
        public void openState(String name) {}
        public void closeState(String name) {}
        public void info(String message) {}
      }

    If you want to direct Logger output to something different from
    STDERR you have to redefine warning(), error() and exception() methods.
      
    Best regards,
    Alexander Peshkov mailto:peshkov@renderx.com
    RenderX

      
    AJT> But how would I set the logging to only show error messages (and no
    AJT> warnings/info messages)? The above example would seem to suppress ALL
    AJT> logging messages, but errors I would still want logged.

    AJT> Any examples/advice on how to route such error messages through a logging
    AJT> framework such as Log4J or LogKit (which is used by the rest of our
    AJT> application)?

    AJT> Thanks!
    AJT> Andrzej Jan Taramina
    AJT> Chaeron Corporation: Enterprise System Solutions
    AJT> http://www.chaeron.com

    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



    This archive was generated by hypermail 2.1.5 : Fri Feb 06 2004 - 06:02:29 PST