The eMail Bug Report Appender files bug reports as email messages.
Email Bug Report Appender takes a number of options from the log4j configuration:
Option | Required | Description |
---|---|---|
hashingMethod | false | In order to minimize reporting duplicate bugs, bug reports are tracked with
semiunique hashes. This setting controls the method by which these hash values are
generated. Available hasing methods:
|
html | false | If this is set to true, messages are delivered in both text and HTML format. Defaults to false. |
htmlLayout | false | Log4j Layout object used to format HTML messages. Defaults to htmlLayout. |
from | true | Email address of sender |
layout | true | A log4j layout. |
maxSize | false | Set the maximum number of logging events the thread bound buffer can hold. Defaults to 200. |
reportDuplicates | false | By default, appenders don't report duplicate bug reports. Set this to true to change this behavior. |
smtpServer | true | Mail server used for delivering messages. |
subjectPrepend | false | This string is prepended to all email subjects. |
thresholdPriority | false | Bug reports are not filed unless one or more logging events is of the specified (or greater) priority. The default priority is ERROR |
thresholdSize | false | For long running threads, it may not be practical to wait until a thread ends to file a report. For long running threads, the Logging Event buffer will be checked (based on the sleepMilliseconds parameter). If the events in the buffer are of suffient number (specified by this parameter) and have met the threadholdPriority, they will be filed as a bug. The default value for this option is 100. |
to | true | Comma delimited list of email recipients |
log4j.rootLogger=DEBUG, A1, A2 log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A2.threshold=ERROR log4j.appender.A2=net.codesmarts.log4j.EmailBugReportAppender log4j.appender.A2.layout=org.apache.log4j.PatternLayout log4j.appender.A2.thresholdPriority=ERROR log4j.appender.A2.to=recipient1@domain.dom,recipient2@domain.dom log4j.appender.A2.from=bugs@domain.dom log4j.appender.A2.smtpServer=mail.domain.dom log4j.appender.A2.html=true # Print the date in ISO 8601 format log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n