ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Issue with using Log4j plug-in node in ESQL

Post new topic  Reply to topic
 Issue with using Log4j plug-in node in ESQL « View previous topic :: View next topic » 
Author Message
deepak_paul
PostPosted: Tue Dec 08, 2009 4:22 am    Post subject: Issue with using Log4j plug-in node in ESQL Reply with quote

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;


Quote:
Input message:

Code:
<Root>
 <Test>1234567890</Test>
</Root>


Quote:
Output Message

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
View user's profile Send private message
smdavies99
PostPosted: Tue Dec 08, 2009 4:53 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Issue with using Log4j plug-in node in ESQL
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.