Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to write on system log

Hi,
how can I write some lines on log file /jazz/server/logs/jazz.log from plugin code on server side?

I'd like to use this way in order to catch possible not blocking problems for participants plugin.

1 vote



One answer

Permanent link
how can I write some lines on log file /jazz/server/logs/jazz.log from
plugin code on server side?

I'd like to use this way in order to catch possible not blocking
problems for participants plugin.

If you are deriving from AbstractService, you can get access to the logger
using

Log log= getLog();

If you are implementing something else, you can also get a logger using

Log log= LogFactory.getLog(id);


To configure e.g. INFO level logging for your code, you would add a line
like this to log4j.properties:

log4j.logger.<id>=INFO

In the case of getLog() above, the id is the component id.

--
Regards,
Patrick
Jazz Work Item Team

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,944

Question asked: Oct 12 '09, 5:42 a.m.

Question was seen: 5,291 times

Last updated: Oct 12 '09, 5:42 a.m.

Confirmation Cancel Confirm