public class ListViewerContext extends TextContext
The list viewer in the Console interprets the data of a Log Entry as a list. Every line in the text data is interpreted as one item of the list. This class takes care of the necessary formatting and escaping required by the corresponding list viewer in the Console.
You can use the ListViewerContext class for creating custom log methods around logCustomContext for sending custom data organized as simple lists.
This class is not guaranteed to be threadsafe.
| Modifier | Constructor and Description |
|---|---|
|
ListViewerContext()
Overloaded.
|
protected |
ListViewerContext(ViewerId vi)
Overloaded.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
escapeLine(String line)
Overridden.
|
protected static String |
escapeLine(String line,
String toEscape)
Escapes a line.
|
appendLine, appendText, close, getViewerData, loadFromFile, loadFromReader, loadFromStream, loadFromText, resetDatagetViewerIdpublic ListViewerContext()
protected ListViewerContext(ViewerId vi)
vi - The viewer ID to use.protected String escapeLine(String line)
escapeLine in class TextContextline - The line to escape.protected static String escapeLine(String line, String toEscape)
line - The line to escape.toEscape - A set of characters which should be escaped in addition to the
newline characters. Can be null or empty.Copyright © 2023. All rights reserved.