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
Expand all | Collapse all

Log For Service

  • 1.  Log For Service

    Posted Mon February 28, 2011 02:26 PM

    Hi All,

    There is a requirement to create a custom log file whenever I execute the SFTP service for any partner. The custom log will have all the activity of the sFTP process.

    Can anybody guide me how to create a custom log file at service level.

    Please help…

    Sasanka


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


  • 2.  RE: Log For Service

    Posted Mon February 28, 2011 11:15 PM

    Refer to the log4J logging Documentation. Use the jar file provided by Apache and then write Java services to log (INFO,ERROR,DEBUG etc levels) the messages. Use the log4j config file to configure the write path (can be a file or a database).

    [url]http://logging.apache.org/log4j/1.2/apidocs/index.html[/url]
    [url]http://logging.apache.org/log4j/1.2/download.html[/url]

    Cheers,
    Akshith


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


  • 3.  RE: Log For Service

    Posted Tue February 23, 2016 04:52 AM

    Hi all,

    Sorry for follow up this old thread.
    I have the same requirement. I’m trying to create custom log using log4j.
    I tried to create a java service then use log4j as my application logging.
    But I can’t import “org.apache.log4j.*” in my service.
    I’ve already copy log4j.jar in packages\logging\code\jars
    and log4j.properties in pub folder.

    am I missing something?

    thanks in advanced.


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


  • 4.  RE: Log For Service

    Posted Tue February 23, 2016 10:38 AM

    what error you are getting ? Please share more details.

    Thanks,


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


  • 5.  RE: Log For Service

    Posted Tue February 23, 2016 11:29 PM

    Hi,

    Thanks for your reply.

    My problem is I can’t import log4j in my java service.
    this Issue is resolved.
    solution :
    I try to copy log4j.jar in packages\logging\code\jars
    and build my package, and it works.

    Now, I’m trying to use Mark’s logging package.
    Write a log4j log message according to level severity and write message by invoking pub.flow.debuglog.

    My question is :
    how can I write the log message in mycostum.log not in server.log ?
    please help.

    Thanks.


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


  • 6.  RE: Log For Service

    Posted Thu February 25, 2016 01:47 AM

    Hi , Pls find blow thread.


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


  • 7.  RE: Log For Service

    Posted Thu February 25, 2016 10:36 PM

    thanks for your reply Frank,

    My problem is resolved.
    I tried to configure filename in log4j.properties. and it works for me.


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


  • 8.  RE: Log For Service

    Posted Wed June 08, 2016 09:46 AM

    @Junedi

    I’m trying to find this “Mark’s log4j” package. I’m aware that it was available in the wmusers, but I’m having a hard time to find it in the TechCommunity site.
    Can you share me the ink to download it?

    Regards,


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


  • 9.  RE: Log For Service

    Posted Wed June 08, 2016 09:51 AM

    … uh. never mind. Just found.
    It happened I oversaw the pages I found so far. I was so focused on the word “log4j” that I missed the “loggings.zip” (http://techcommunity.softwareag.com/ecosystem/communities/public/webmethods/products/bpm_suite/codesamples/59bf91a8-b1d3-11e4-8d00-cd8d7ef22065/).


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