Hi,
Hi,
I have made a small change in SMTPHandler.sendBuffer(), so that is somebody
uses a string {0} in the subject, e.g.
smtphandler.subject = Log message {0}
then the {0} is replaced by log level of the las log in the cyclic buffer.
// subject
if (subject != null) {
try {
String levelName = cb.getLastAndKeepIt().getLevel().getName();
msg.setSubject(MessageFormat.format(subject, new Object[]
{levelName}));
} catch (Exception e) {
reportError("Cannot set subject", e, DEFAULT_ERROR_CODE);
}
}
and CyclicBuffer.java:
public LogRecord getLastAndKeepIt()
{
if (numElems <= 0)
return null;
return records[(last - 1) % maxSize];
}
Nobody/Anonymous
None
None
Public
|
Date: 2009-06-05 13:42 This issue was created by mistake. |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2009-06-05 13:42 | xmedeko |
| priority | 5 | 2009-06-05 13:42 | xmedeko |
| allow_comments | 1 | 2009-06-05 13:42 | xmedeko |
| close_date | - | 2009-06-05 13:42 | xmedeko |