Upgrading from v1.0
If you are already using jLo and want to upgrade from v1.0 to v1.1 then you have to adjust the XML configurations. There are two slight differences.
With the latest version jLo supports the use of parameters for both handlers and formatters. So there is now a need to separate these parameter definition.
Inside the generator block the actual handler and formatter is defined using the
class attribute of the tag.
Now
<generator name="TestGenerator">
<formatter class="SimpleFormatter"/>
<handler class="MockHandler"/>
</generator>
Before
<generator name="TestGenerator">
<formatter>SimpleFormatter</formatter>
<handler>MockHandler</handler>
</generator>
If you use a handler or formatter that requires parameters then define the parameters within the handler or formatter tag.
Here is an example of the
DefinedFormatter which requires the
format parameter and the
MailHandler requiring quite a few more:
<generator name="MailGenerator">
<formatter class="DefinedFormatter">
<parameter name="format" value="${date:yyyy/MM/dd} ${time:HH:mm:ss} [${target}] [${short_class}]:${message}"/>
</formatter>
<handler class="MailHandler">
<parameter name="smtphost" value="smtp.mail.yahoo.com"/>
<parameter name="sender" value="xxxxx@yahoo.com"/>
<parameter name="recipient" value="andreas.mecky@xcom.de"/>
<parameter name="subject" value="Error Mail"/>
<parameter name="user" value="user"/>
<parameter name="pwd" value="pwd"/>
<parameter name="popserver" value="pop.mail.yahoo.com"/>
<parameter name="authentification" value="true"/>
</handler>
</generator>