IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  custom log as server log

    Posted Tue September 23, 2008 06:07 AM

    Hi All,

    Currently, we have couple business flows sharing with an IS. We want to log different business flows into different log files instead of all in the server.log.
    Can I use FileWriter to accomplish this task? If multiple threads try to append sample log file, will I get exception?
    wM debugLog seems handle this well but it only can append logs into ONE assigned server.log and I only can find it uses JournalLogger.log() and don’t know how it can be instantiated with different log files.
    Will standard java logging.Handler work on this situation?
    Or, should I use Log4J to handle the custom logging?

    Thanks for any suggestions!

    KJ


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: custom log as server log

    Posted Tue September 23, 2008 08:49 AM


  • 3.  RE: custom log as server log

    Posted Tue September 23, 2008 03:01 PM

    Log4J would be the best option - a little more work up front, but easier to maintain, modify long-term. There are some examples in the KnowledgeBase area of this website, I believe.

    You ‘could’ achieve this with an audit EventManager as well, but just about everyone flips out when they hear that, so pursue other options first. :slight_smile:


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: custom log as server log

    Posted Tue September 23, 2008 09:56 PM

    If I’m not mistaken, there are also public methods in the IS Java API that can be used to achieve the same behavior as server.log for another custom file.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 5.  RE: custom log as server log

    Posted Wed September 24, 2008 10:22 PM

    Hi Reamon,

    Can you kindly tell me what is the java API name?
    I decompiled flow.class and found debugLog() applies JournalLog private class and its API doesn’t allow us to specify 2nd log file name.
    Looks like Log4j will be a easier solution for this task.

    Thanks a lot!!

    KJ


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: custom log as server log

    Posted Thu September 25, 2008 12:00 AM

    ServerAPI.getLogStream

    The method description has the details on how this stream is managed.

    You’ll want to write some helper services to manage access to the stream and a “writeLog” service that uses either a fixed stream (created at package startup for example) or accepts a stream object.

    Just another option to consider.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 7.  RE: custom log as server log

    Posted Thu September 25, 2008 03:52 AM