Package com.icegreen.greenmail.util
Class LineLoggingBuffer
java.lang.Object
com.icegreen.greenmail.util.LineLoggingBuffer
Buffers and logs when detecting CR-LF.
- Wraps long lines
- Escapes non-ASCII-printable chars
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLineLoggingBuffer(String linePrefix) Creates new buffer using given line prefix. -
Method Summary
-
Field Details
-
log
protected final org.slf4j.Logger log -
WRAP
protected static final byte[] WRAP
-
-
Constructor Details
-
LineLoggingBuffer
Creates new buffer using given line prefix.- Parameters:
linePrefix- prefix for each line printed, eg "S:" or "C:"
-
-
Method Details
-
append
public void append(int b) Appends and escapes value.- Parameters:
b- value
-
logLine
public void logLine()Triggers log output of current buffer (if any) and resets back to empty buffer. -
isLineLengthExceeded
protected boolean isLineLengthExceeded()
-