ERXMailAppender Class Reference
Inherits org::apache::log4j::AppenderSkeleton.
Inherited by ERCMailMessageAppender.
List of all members.
Detailed Description
Basic log4j Mail Message Appender.
Used for
logging log events that will eventually be emailed out. Logs events using
WOMailDelivery.
Mandatory Fields:
ToAddresses - comma separated list of email addresses to send the log event message to.
FromAddress - Who the message is from, if left blank then DomainName is a mandatory field.
Optional Fields:
BccAddresses - comma separated list of email address to bcc on the email
CcAddresses - comma separated list of email address to cc on the email
ReplyTo - reply to address
DomainName - When generating a from email address, used for the bit after the "@", ie
foo@bar.com, the domain name is 'bar.com'.
HostName - When generating an email address from, defaults to name of the localhost.
ExceptionPage - name of the exception page, is unset,
Title - Title of the email messages, if not specified the title will be a truncated version of the log message.
Qualifier - qualifier that defines if the event should be logged.
Constructor & Destructor Documentation
Member Function Documentation
| void append |
( |
LoggingEvent |
event |
) |
|
Entry point for logging an event.
Reminder: the nesting of calls is:
doAppend()
- Parameters:
-
Gets the bcc addresses as a String.
- Returns:
- bcc addresses as a string
| NSArray bccAddressesAsArray |
( |
|
) |
|
Gets the bcc addresses as an array.
- Returns:
- the bcc addresses as an array.
Gets the cc addresses as a String.
- Returns:
- cc addresses as a string
| NSArray ccAddressesAsArray |
( |
|
) |
|
Gets the cc addresses as an array.
- Returns:
- the cc addresses as an array.
| boolean checkConditions |
( |
|
) |
[protected] |
Used to determine if the system is ready to log events with MERCMailDelivery.
- Returns:
- true if all of the conditions are satisfied
When closed set the state to closed. Closes the current appender.
In case we generate a HTML page, we construct a dictionary with the entries that is later pushed into the page. This is the place to override and extend in case you want to provide your own pages. Current keys are: extraInfo - NSDictionary of extra info from the application errorMessage - the title for the message formattedMessage - the actual message exception - the throwable given by the event reasonLines - NSArray of strings that give the backtrace
- Parameters:
-
Reimplemented in ERCMailMessageAppender.
| String composeMessage |
( |
LoggingEvent |
event |
) |
|
Where the actual logging event is processed and a mail message is generated.
- Parameters:
-
| String composeTitle |
( |
LoggingEvent |
event |
) |
|
Gets the from address for the appender. If a from address is not specified then an address is constructed in the form: applicationName-hostName.
- Returns:
- the from address.
| boolean formatAsErrorAsBoolean |
( |
|
) |
|
Gets the domain name.
- Returns:
- domain name.
| String getExceptionPageName |
( |
|
) |
|
Gets the from address set by the user.
- Returns:
- the from address.
Gets the host name. If one is not specified then the host name of the machine will be used.
- Returns:
- host name to use when constructing the 'from' email address.
Gets the qualifier as a string.
- Returns:
- the qualifier as string.
Gets the reply to address set by the user.
- Returns:
- the reply to address.
Gets the title.
- Returns:
- title.
Gets the to addresses as a string.
- Returns:
- to addresses as a string
Gets the qualifier.
- Returns:
- the from address.
| boolean requiresLayout |
( |
|
) |
|
The mail message appender does require a layout.
- Returns:
- true.
| void setBccAddresses |
( |
String |
bccAddresses |
) |
|
Sets the bcc addresses as a string.
- Parameters:
-
| bccAddresses | comma separated array of email addresses |
| void setCcAddresses |
( |
String |
ccAddresses |
) |
|
Sets the to addresses as a string.
- Parameters:
-
| ccAddresses | comma separated array of email addresses |
| void setDomainName |
( |
String |
domainName |
) |
|
Sets the domain name.
- Parameters:
-
| domainName | new domain name |
| void setExceptionPageName |
( |
String |
exceptionPageName |
) |
|
Sets the title.
- Parameters:
-
| exceptionPageName | title of the mail message |
| void setFormatAsError |
( |
String |
value |
) |
|
| void setFromAddress |
( |
String |
fromAddress |
) |
|
Sets the from address.
- Parameters:
-
| fromAddress | to use when generating emails. |
| void setHostName |
( |
String |
hostName |
) |
|
Sets the host name to use for the given appender.
- Parameters:
-
| hostName | for the appender. |
| void setQualifier |
( |
String |
qualifier |
) |
|
Sets the qualifier as a string.
- Parameters:
-
| qualifier | the qualifier as string. |
| void setReplyTo |
( |
String |
replyTo |
) |
|
Sets the reply to address.
- Parameters:
-
| replyTo | to address to use when generating emails. |
| void setTitle |
( |
String |
title |
) |
|
Sets the title.
- Parameters:
-
| title | of the mail message |
| void setTitleIncludesApplicationName |
( |
String |
value |
) |
|
| void setTitleIncludesPriorityLevel |
( |
String |
value |
) |
|
| void setToAddresses |
( |
String |
toAddresses |
) |
|
Sets the to addresses as a string.
- Parameters:
-
| toAddresses | comma separated array of email addresses |
| void subAppend |
( |
LoggingEvent |
event |
) |
|
| boolean titleIncludesApplicationNameAsBoolean |
( |
|
) |
|
| boolean titleIncludesPriorityLevelAsBoolean |
( |
|
) |
|
| NSArray toAddressesAsArray |
( |
|
) |
|
Gets the to addresses as an array.
- Returns:
- the to addresses as an array.
Member Data Documentation
holds the computed from address
holds the flag if all the conditions for logging have been checked
holds the exception page name
holds the reply to address
The documentation for this class was generated from the following file: