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

Implementing logging in server side extension

I am wrriting a custom server side plugin for RTC. I would like to add logging. How can I do that?

0 votes


Accepted answer

Permanent link
You have to add the following part of the code to your plugin:

import org.apache.commons.logging.LogFactory;

...

private static final Log logger = LogFactory.getLog("com.myCompany.MyClassName");

...

logger.debug("Debug information");

logger.error("Error information");

If you want to change log level, you need to modify log4j.properties:

log4j.logger.com.myCompany.MyClassName=DEBUG.

Ralph Schoon selected this answer as the correct answer

1 vote


One other answer

Permanent link

 Hello Ralph,


I need to add loggers at server side. However there's no log4j.properties file. There's log4j2.xml file. Here it captures only log.error statements. I need to capture log.info or log.debug statements.

Thanks in Advance,
Vinilda

0 votes

Comments

I would suggest you search the server SDK for log4j usage, especially since the latest version of ELM uses a different Version of log4j and things work a bit different.  

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,938
× 7,495
× 8

Question asked: Oct 22 '19, 8:02 a.m.

Question was seen: 1,854 times

Last updated: Aug 09 '23, 8:33 a.m.

Confirmation Cancel Confirm