|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Window Event Logging is not working through IIB |
« View previous topic :: View next topic » |
Author |
Message
|
prabhu_s1177 |
Posted: Fri Jul 25, 2014 10:02 pm Post subject: Window Event Logging is not working through IIB |
|
|
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 |
|
 |
fjb_saper |
Posted: Sat Jul 26, 2014 2:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Did you add the .dll to your project?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
prabhu_s1177 |
Posted: Mon Jul 28, 2014 4:40 am Post subject: Window Event Logging is not working through IIB |
|
|
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 |
|
 |
mqjeff |
Posted: Mon Jul 28, 2014 5:25 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
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
|
|
|
|