App Connect

App Connect

Join this online user 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.


#Applicationintegration
#App Connect
#AppConnect
 View Only
Expand all | Collapse all

Logging in ESQL, is there a way to extract/retrieve the message content defined in message catalog using ESQL?

  • 1.  Logging in ESQL, is there a way to extract/retrieve the message content defined in message catalog using ESQL?

    Posted Tue May 16, 2023 03:47 PM

    Hi,

    We are exploring the logging provided by the ESQL LOG statement. Since I will need to define some messages in the message catalog for the ESQL LOG statement, the question is: can I utilize the messages defined in the message catalog, and put the content into the output response message?

    Currently, we used properties file to define some of the error messages we use, then we extract the content by the error code and assemble it into the output response message. Since it is almost the same to define the properties file and the message catalog, I am trying to see if there is a way to extract the description of the message back from the message catalog in ESQL or via some java bridge.

    I have briefly look at syslog, and it seems to be mainly a listener on UDP port, and I don't see there is a query functionality to retrieve the content in the message catalog, so I am not sure this approach is plausible due to the design of syslog facility.

    Comments and suggestions are appreciated. Thanks in advance.

     



    ------------------------------
    Kenny Kew
    ------------------------------


  • 2.  RE: Logging in ESQL, is there a way to extract/retrieve the message content defined in message catalog using ESQL?

    Posted Mon May 22, 2023 06:56 AM

    Hi @Kenny Kew 

    At least for all the BIPmsgs I have created a Java wrapper to read the BIPmsgs catalog file from the classpath and create a nice error message of the most inner part of the ExceptionList quite a long time ago. With such a function you can even add all the values from the Inserts given within the ExceptionList.

    Kind regards
    Jan



    ------------------------------
    Jan Frederik Sorge
    ------------------------------



  • 3.  RE: Logging in ESQL, is there a way to extract/retrieve the message content defined in message catalog using ESQL?

    Posted Tue May 23, 2023 01:40 PM
    Edited by Kenny Kew Tue May 23, 2023 01:41 PM

    Hi @Jan Frederik Sorge ,

    Thank you very much for your reply. May I know a bit more about the Java Wrapper you created?

    Does it import an extrernal Java lib or which function does it call to read the calalog file? Or would you have a sample that you can share?

    Thanks & Regards,



    ------------------------------
    Kenny Kew
    ------------------------------



  • 4.  RE: Logging in ESQL, is there a way to extract/retrieve the message content defined in message catalog using ESQL?

    Posted Wed May 24, 2023 07:37 AM

    Hi @Kenny Kew 

    I would love to give you an example but I don't own this code anymore and I would expect my former colleagues not able to share it as well ;-)
    As far as I remember I read the BIPmsgs message catalog file as Properties and than parsed the values from Insert into an array to set the placeholders within the String for the given BIP number. This method had to be static in order to allow an ESQL wrapper to call it from there.

    Good luck whilst implementing a similar solution!

    Kind regards
    Jan



    ------------------------------
    Jan Frederik Sorge
    ------------------------------