Reloading log4j.xml configuration without server restart

25 views
Skip to first unread message

sushmitha s rao

unread,
Apr 11, 2013, 5:10:38 AM4/11/13
to d...@openmrs.org
Hi,

Is log4j configured currently such that changes to the log4j.xml will be reloaded without a server restart in openMRS 1.9.x branch?
I have tried using it but the reload didn't seem to be configured.
Also, if this is a requirement, is there a ticket to track this?   

Rafal Korytkowski

unread,
Apr 11, 2013, 5:15:21 AM4/11/13
to Developers List
Hi,

You need to restart the server to see changes. Try https://wiki.openmrs.org/display/docs/Log+Manager+Module instead.


-Rafał


--
OpenMRS Developers: http://go.openmrs.org/dev
Post: d...@openmrs.org
Unsubscribe: dev+uns...@openmrs.org
Manage your OpenMRS subscriptions at https://id.openmrs.org/
 
 

sushmitha s rao

unread,
Apr 11, 2013, 5:31:56 AM4/11/13
to d...@openmrs.org
Hi Rafal,

The log manager module seems to do the job. But we intend to not have any manual intervention to reload the log4j configuration. We are adding a couple of appenders which are specific to the openmrs modules we have built.
Would it be better to include the log4jRefreshInterval and a listener to automatically reload the config instead? 

Sushmitha

Rafal Korytkowski

unread,
Apr 11, 2013, 5:50:55 AM4/11/13
to Developers List
The easiest way may be to use Log4jConfigListener. Please create a ticket in core and send us a pull request with a proposed solution. Thanks!


-Rafał

sushmitha s rao

unread,
Apr 11, 2013, 6:05:49 AM4/11/13
to dev
Hi Rafal,

and have also sent a pull request with the proposed fix. 
Thanks a lot for your help. 

Sushmitha

Wyclif Luyima

unread,
Apr 11, 2013, 9:34:43 AM4/11/13
to Developers
If your intention is just to change log levels, then setting the appropriate value for the "log.level" global property should be all you need to to and this takes immediate effect.

Wyclif
Wyclif Luyima
Regenstrief Institute Inc.

Confidentiality Notice: The contents of this message and any files transmitted with it may contain confidential and/or privileged information and are intended solely for the use of the named addressee(s). Additionally, the information contained herein may have been disclosed to you from medical records with confidentiality protected by federal and state laws. Federal regulations and State laws prohibit you from making further disclosure of such information without the specific written consent of the person to whom the information pertains or as otherwise permitted by such regulations. A general authorization for the release of medical or other information is not sufficient for this purpose.

If you have received this message in error, please notify the sender by return e-mail and delete the original message. Any retention, disclosure, copying, distribution or use of this information by anyone other than the intended recipient is strictly prohibited.
Reply all
Reply to author
Forward
0 new messages