Class DebugRecordFormat
- java.lang.Object
-
- com.sun.identity.shared.debug.file.impl.DebugRecordFormat
-
public final class DebugRecordFormat extends Object
Lays out one debug record: the prefix line, the message, and the stack trace if there is one. A record is told from the next by its prefix line starting at column 0, followed by the first line of the message, also at column 0; nothing else that is logged may start a line there: every line break inside the message and every line of the stack trace (an exception's message is logged data too) continues the record indented, and a line break inside the prefix (the transaction id can come from a request header) is written as a space. A single-line message, the usual case, is written exactly as it always was, and a multi-line dump stays readable, indented.This is what keeps a value taken from a request - a user name, a RelayState, a SAML attribute - from forging a record of its own, whether it reaches the debug file through
Debugdirectly or through the SLF4J binding.
-
-
Method Detail
-
format
public static String format(String prefix, String msg, Throwable th)
- Parameters:
prefix- the record's prefix line (debug name, timestamp, thread, transaction)msg- the message;nullis written asnullth- the throwable whose stack trace follows the message, ornull- Returns:
- the record, without a trailing line break
-
-