20130816 fixing log4j in openfire - plembo/onemoretech GitHub Wiki

title: Fixing log4j in Openfire link: https://onemoretech.wordpress.com/2013/08/16/fixing-log4j-in-openfire/ author: phil2nc description: post_id: 6255 created: 2013/08/16 15:39:44 created_gmt: 2013/08/16 19:39:44 comment_status: closed post_name: fixing-log4j-in-openfire status: publish post_type: post

Fixing log4j in Openfire

Even the latest Openfire server has a bug somewhere in its configuration that prevents some logs from being written. Fix follows. I love Openfire, at least until it bites me. Openfire is probably the best XMPP server available. Written in Java and able to run without a separate application server, it is stable and reliable. Its plugin architecture also makes it emminently extensible. Of course nothing is perfect, and that includes Openfire. One annoyance I tripped over months into my first beta test was that the log4j subsystem wasn't able to write some log files, a fact that showed up consistently in the message logs for the server. The fix was to replace references to a variable that was supposed to stand in for the server installation home with something a bit more direct. Basically all I needed to do was edit the file $OPENFIRE_HOME/lib/log4j.xml and replace all references to {openfireHome} with "../", so the file looked something like this: [code language="xml" gutter="false"] * * * * * * * * * [/code] Once this change was made I restarted Openfire and it happily began writing its logs to $OPENFIRE_HOME/logs.

Copyright 2004-2019 Phil Lembo