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 » IBM MQ API Support » Writing API Exit log to WMQ Error logs

Post new topic  Reply to topic
 Writing API Exit log to WMQ Error logs « View previous topic :: View next topic » 
Author Message
MB
PostPosted: Tue Nov 23, 2004 2:58 pm    Post subject: Writing API Exit log to WMQ Error logs Reply with quote

Acolyte

Joined: 25 Jun 2004
Posts: 52

Hi,

We have MQ API Exits (C programs) running on QMs on Windows and AIX. This API Exit inturn makes certain API calls. The existing program writes the events (like an API call within the exit program failing with some reason code etc.) to a separate file on the AIX box (using fprintf statments in C language).

I wanted to know if there is a way to write such events directly to the WMQ log (AMQERR0#.log of that QM or the log file at MQ level).
One way I can think of is to use fprintf on the AMQERR0#.log file. (For this, I have to hardcode the path of the file in the API Exit program or maintain a path variable in the system.)
Is there any other way of achieving this without the fprintf statements?

Thanks and Regards,
MB
Back to top
View user's profile Send private message
Nigelg
PostPosted: Wed Nov 24, 2004 12:27 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

I do not think that is a very good idea, for several reasons.
1. The WMQ error logs are written to under lock. If you have another process writing to the file which disregards the locking protocol the likely result is an interleaving of text in the file.
2. The WMQ error logs are copied/renamed/truncated when they reach 256K. Again, if another process writes to the file sooner or later the text wil be lost when the file is truncated.
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 » IBM MQ API Support » Writing API Exit log to WMQ Error logs
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.