|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Issue with using Log4j plug-in node in ESQL |
« View previous topic :: View next topic » |
Author |
Message
|
deepak_paul |
Posted: Tue Dec 08, 2009 4:22 am Post subject: Issue with using Log4j plug-in node in ESQL |
|
|
Centurion
Joined: 04 Oct 2008 Posts: 147 Location: US
|
All,
I have tried to get the input message or at least an element in the input message in a log file using relavant log4j functions in ESQL as mentioned below.
Code: |
CREATE FUNCTION initLog4j( IN CONFIG_FILE_NAME CHARACTER )
RETURNS BOOLEAN
LANGUAGE JAVA
EXTERNAL NAME "com.ibm.broker.IAM3.Log4jNode.initLog4j";
CREATE FUNCTION log4j( IN COMPONENT_NAME CHARACTER,
IN LEVEL CHARACTER,
IN TEXT CHARACTER )
RETURNS BOOLEAN
LANGUAGE JAVA
EXTERNAL NAME "com.ibm.broker.IAM3.Log4jNode.log";
CREATE FUNCTION log4j_1_1( IN COMPONENT_NAME CHARACTER,
IN LOGGER_NAME CHARACTER,
IN LEVEL CHARACTER,
IN TEXT CHARACTER )
RETURNS BOOLEAN
LANGUAGE JAVA
EXTERNAL NAME "com.ibm.broker.IAM3.Log4jNode.log";
CALL log4j('test', 'WARN','Message from ESQL'||InputRoot.XMLNS.Root.Test) INTO rc;
|
Code: |
<Root>
<Test>1234567890</Test>
</Root>
|
Code: |
07:00:39,101 WARN [test ] |
In the output message, i am not getting the specified element in the output message. Could you please help me how i can get the exact input mesage and/or at least and elment in the input message using log4j functions. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Dec 08, 2009 4:53 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Quote: |
Code: |
CALL log4j('test', 'WARN','Message from ESQL'||InputRoot.XMLNS.Root.Test) INTO rc;
|
|
I suspect this statement is the cause of your problem.
-Disconnect the debugger
- Enable User Trace
- Send a message
- Disable User Trace
- Read the Trage log & format as XML
- Format the XML as human readable text.
Look at what is happening in this statement especially the result from the concatenation process. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|