This LogManager sends log messages via e-mail. Log messages are collected up to a set maximum number (see below) and sent via e-mail to a specific address.
The class name of the MailLogManager, as it must be specified when adding to LogService, is "com.ebd.hub.services.log.mail.MailLogManager".
Basic configuration by using the XML file
The following XML fragment with all possible basic settings can be used to configure the MailLogManager.
<Set name="idleTime">60000</Set>
<Set name="mailHost">hostName</Set>
<Set name="mailPort">port</Set>
<Set name="name">name</Set>
<Set name="password">password</Set>
<Set name="sender">sender</Set>
<Set name="subject">subject</Set>
<Set name="user">user</Set>The parameters have the following meaning.
Parameter | Description |
|---|---|
idleTime | The time in milliseconds that is waited before the previously collected messages are sent via e-mail, although the set number of log messages has not yet been reached. |
mailHost | The host name of the email server to be used to send e-mails. |
mailPort | The port of the e-mail server. |
name | The name of the LogManager, as it should be known to the LogService. |
password | The password for the e-mail server. |
sender | The email address to be used as sender of the e-mail. |
subject | The subject to be used for the e-mail. |
user | The user name for the e-mail server. |
Adding recipients for the e-mails to be sent
The following XML fragment adds an address to the list to which e-mails are to be sent.
<Call name="addRecipient">
<Arg>recipient@domain.com</Arg>
</Call>If several recipients are to receive the e-mail, further calls can be set.
Setting the number of messages to be merged into an e-mail
The following XML fragment sets the number of messages to be merged into one e-mail.
<Call name="combineMessages">
<Arg type="int">10</Arg>
</Call>