MailLogManager
This LogManager sends log messages via email. Log messages are collected up to a set maximum number (see below) and sent via email 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 email, 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 emails. |
mailPort |
The port of the email server. |
name |
The name of the LogManager, as it should be known to the LogService. |
password |
The password for the email server. |
sender |
The email address to be used as sender of the email. |
subject |
The subject to be used for the email. |
user |
The user name for the email server. |
Adding recipients for the emails to be sent
The following XML fragment adds an address to the list to which emails are to be sent.
<
Call
name
=
"addRecipient"
>
<
Arg
>recipient@domain.com</
Arg
>
</
Call
>
If several recipients are to receive the email, further calls can be set.
Setting the number of messages to be merged into an email
The following XML fragment sets the number of messages to be merged into one email.
<
Call
name
=
"combineMessages"
>
<
Arg
type
=
"int"
>10</
Arg
>
</
Call
>