Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Writing to a log file in Maximo
jballnik
Hey Gang,
Is there a way I can enable a log file to print when a BIRT report is run in Maximo? I can get a log file when running it through Eclipse, but I would like to see it while it runs through Maximo.
thanks,
John
Find more posts tagged with
Comments
wwilliams
Have you tried via the Maximo loggers?
log4j.logger.maximo.service.BIRTREPORT
Alisyah
<blockquote class='ipsBlockquote' data-author="'wwilliams'" data-cid="112656" data-time="1356032997" data-date="20 December 2012 - 12:49 PM"><p>
Have you tried via the Maximo loggers?<br />
log4j.logger.maximo.service.BIRTREPORT<br /></p></blockquote>
<br />
If you're editing the .rptdesign file with Eclipse, you can go to XML Source tab<br />
Then add these line:<br />
mxReportScriptContext = MXReportScriptContext.initialize(reportContext);<br />
mxReportScriptContext.setDefaultLogLevel("DEBUG");<br />
mxReportScriptContext.setDefaultLogFile("c:/temp/poprint.log");
micajblock
<blockquote class='ipsBlockquote' data-author="'Alisyah'" data-cid="113611" data-time="1359356398" data-date="27 January 2013 - 11:59 PM"><p>
If you're editing the .rptdesign file with Eclipse, you can go to XML Source tab<br /></p></blockquote>
<br />
Not a good idea to edit the XML source. <br />
<br />
This should go in the beforeFactory.
Alisyah
I ever tried log4j but didn't make it. Anyone did? Please share us a link if any.
--editing--
can we delete our post? I only click once but two posts exist.
Alisyah
I ever tried log4j but didn't make it. Anyone did? Please share us a link if any.
jverly01
Here is a good start for Logging in Maximo:<br />
<br />
<a class='bbc_url' href='
http://www-01.ibm.com/support/docview.wss?uid=swg21264064'>http://www-01.ibm.com/support/docview.wss?uid=swg21264064</a><br
/>
<br />
The other option is to review the logs in BIRT Designer before deploying the report. I haven't tried placing the debug settings in the BeforeFactory method, but I know the IBM best practice is to place it in the initialize method of the main report.<br />
<br />
In BIRT Designer, in the outline view (which should be on the left side of the BIRT Designer), click on the top of the tree which should be the name of the report - e.g. foobar_report.rptdesign. <br />
<br />
Select the initialize method and add the following:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>mxReportScriptContext.setDefaultLogLevel("DEBUG");
mxReportScriptContext.setDefaultLogFile("C:/temp/foobar_report.log");
</pre>
<br />
Now evertime the report is previewed in BIRT Designer, you'll get a log file in c:\temp folder.
micajblock
<blockquote class='ipsBlockquote' data-author="'jverly01'" data-cid="115011" data-time="1363124241" data-date="12 March 2013 - 02:37 PM"><p>
I know the IBM best practice is to place it in the initialize method of the main report.<br /></p></blockquote>
<br />
Actually the beforeFactory is the better place as the initialize method gets called twice. Once for generation and then once when rendering.
wwilliams
Here is a good resource I found related to report logging in the designer and within Maximo.
https://www-304.ibm.com/support/docview.wss?uid=swg21423974&aid=1