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 » how to log message tree into log file

Post new topic  Reply to topic
 how to log message tree into log file « View previous topic :: View next topic » 
Author Message
lium
PostPosted: Wed May 12, 2010 2:04 pm    Post subject: how to log message tree into log file Reply with quote

Disciple

Joined: 17 Jul 2002
Posts: 184

I want to log part or whole message tree into log file, ie, part or whole of InputBody, LocalEnvironment, Output etc.
I have implemented a logger based on log4j which logs to a file and is working well. So now my mission is how to convert part of whole message tree into CHAR using ESQL.
Using ASBITSTREAM? it can convert part or whole message tree in to blob. But I then have to convert the blob into clob. Is there any better way to do that?


Thanks,
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 12, 2010 2:09 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Have you even looked at the trace node?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Svp
PostPosted: Wed May 12, 2010 2:15 pm    Post subject: Reply with quote

Apprentice

Joined: 18 Feb 2010
Posts: 40

Using
x is blob = ASBITSTREAM(part of message or inputroot.xmlnsc)
msg is char= cast (x as char ccsid 437)

call log4j(xxx,msg,xxx);
Back to top
View user's profile Send private message
sridhsri
PostPosted: Wed May 12, 2010 2:27 pm    Post subject: Reply with quote

Master

Joined: 19 Jun 2008
Posts: 297

I wouldn't use Svp's method. They can't be turned off by an administrator and require a re-deploy of flow to turn it off. Trace nodes are the best way to go.
Back to top
View user's profile Send private message
lium
PostPosted: Wed May 12, 2010 3:13 pm    Post subject: Reply with quote

Disciple

Joined: 17 Jul 2002
Posts: 184

Thanks for reply.
Trace node is the easiest way to think of, but we might want to log inside a node, ie, in the middle of compute node's module. Another issue is the Trace node might have extra information, and the format is not exactly what we want to have
Back to top
View user's profile Send private message
lium
PostPosted: Wed May 12, 2010 3:23 pm    Post subject: Reply with quote

Disciple

Joined: 17 Jul 2002
Posts: 184

Great Thanks, SVP.
I just tried your solution, and it is exactly what I want.
TO sridhsri: I know this can not be turned on or off. I am going to implement a cachemanager, from which I can get the logging level, if it is debug level, then I will do the logging.
Actually, I tried SVP's way before, but without specify the CCSID, what I got is string like X'xxxxxxxx' which does not make sense to me.

Thanks again to everybody
Back to top
View user's profile Send private message
Svp
PostPosted: Wed May 12, 2010 5:12 pm    Post subject: Reply with quote

Apprentice

Joined: 18 Feb 2010
Posts: 40

could you tell me how you setup and configured log4j.properties file in your environment.
Are you using Windows?
Back to top
View user's profile Send private message
lium
PostPosted: Wed May 12, 2010 5:31 pm    Post subject: Reply with quote

Disciple

Joined: 17 Jul 2002
Posts: 184

We developed on windows and deploy on Unix.
We created a procedure to do this:
for example:

CREATE PROCEDURE Logger(IN logContent CHARACTER, IN logType CHARACTER)
LANGUAGE JAVA
EXTERNAL NAME "common.lib.Logger.log";

Then you implement common.lib.Logger class with log method. This class is nothing special but standard java class using log4j. Tons of example for such log4j class you can search from internet.
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 » how to log message tree into log file
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.