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 » Window Event Logging is not working through IIB

Post new topic  Reply to topic
 Window Event Logging is not working through IIB « View previous topic :: View next topic » 
Author Message
prabhu_s1177
PostPosted: Fri Jul 25, 2014 10:02 pm    Post subject: Window Event Logging is not working through IIB Reply with quote

Apprentice

Joined: 26 Nov 2007
Posts: 34

Hi All,

Am trying to log, some business transactions logs to Windows Event log(using Windows32EventLogAppender.dll, log4j) viewer through java Code from IIB.

If I run it is as standalone Java program it works perfectly however if run through IIB it is not working, there were no exception thrown when checked through Debug perspective in IIB

Java Code:
PropertyConfigurator.configureAndWatch("log4j.properties");
Logger logger = LogManager.getLogger(WindowsEventLogging.class);

//PatternLayout layout = new PatternLayout();
String conversionPattern = "Hi.. this is test";
//layout.setConversionPattern(conversionPattern);

logger.info("Info:"+ conversionPattern);
logger.error("debug:"+ conversionPattern);

Please guide me I need complete this task ASAP.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Jul 26, 2014 2:12 am    Post subject: Reply with quote

Grand High Poobah

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

Did you add the .dll to your project?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
prabhu_s1177
PostPosted: Mon Jul 28, 2014 4:40 am    Post subject: Window Event Logging is not working through IIB Reply with quote

Apprentice

Joined: 26 Nov 2007
Posts: 34

Hi,

I have added that DLL into my project.

However issue got resolved. Based on the various trial and eror methods I found that It looks like if I ran it as Java program it is not referring the log4j.properties file but if I deploy and run IIB check it is refering the Log4j.properties file.

I have commented log4j.properties file calling in esql and ran it worked and run successfully in both standlone java and properties file.

Strange!!!!!!!!!!!!.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jul 28, 2014 5:25 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Throw away all code that uses log4j.

Use javax.util.logging instead!

REALLY.

Stop trying to use 'properties' files in Broker.

Use properties on the bar file instead.

REALLY.

Spend a fair bit of time READING ABOUT THE JAVA RUNTIME in IIB documentation. *think*.

And never put anything in the classes directory.
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 » Window Event Logging is not working through IIB
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.