Lines 332-345
Link Here
|
332 |
} |
332 |
} |
333 |
|
333 |
|
334 |
/** |
334 |
/** |
335 |
Send the contents of the cyclic buffer as an e-mail message. |
335 |
build email message body |
336 |
*/ |
336 |
*/ |
337 |
protected |
337 |
protected StringBuffer buildEmailBody() { |
338 |
void sendBuffer() { |
338 |
|
339 |
|
339 |
// Note: this code already owns the monitor for this |
340 |
// Note: this code already owns the monitor for this |
340 |
// appender. This frees us from needing to synchronize on 'cb'. |
341 |
// appender. This frees us from needing to synchronize on 'cb'. |
341 |
|
342 |
try { |
|
|
343 |
StringBuffer sbuf = new StringBuffer(); |
342 |
StringBuffer sbuf = new StringBuffer(); |
344 |
String t = layout.getHeader(); |
343 |
String t = layout.getHeader(); |
345 |
if(t != null) |
344 |
if(t != null) |
Lines 363-369
Link Here
|
363 |
if(t != null) { |
362 |
if(t != null) { |
364 |
sbuf.append(t); |
363 |
sbuf.append(t); |
365 |
} |
364 |
} |
|
|
365 |
|
366 |
return sbuf; |
367 |
} |
368 |
|
369 |
/** |
370 |
Send the contents of the cyclic buffer as an e-mail message. |
371 |
*/ |
372 |
protected |
373 |
void sendBuffer() { |
366 |
|
374 |
|
|
|
375 |
try { |
376 |
|
377 |
StringBuffer sbuf = buildEmailBody(); |
378 |
|
367 |
String s = sbuf.toString(); |
379 |
String s = sbuf.toString(); |
368 |
boolean allAscii = true; |
380 |
boolean allAscii = true; |
369 |
for(int i = 0; i < s.length() && allAscii; i++) { |
381 |
for(int i = 0; i < s.length() && allAscii; i++) { |