public final class ThrowableFormatOptions extends Object
Throwable
pattern is formatted.Modifier and Type | Field and Description |
---|---|
static String |
CLASS_NAME |
protected static ThrowableFormatOptions |
DEFAULT
Default instance of
ThrowableFormatOptions . |
static String |
FILE_NAME |
static String |
LINE_NUMBER |
static String |
LOCALIZED_MESSAGE |
static String |
MESSAGE |
static String |
METHOD_NAME |
Modifier | Constructor and Description |
---|---|
protected |
ThrowableFormatOptions()
Construct the options for printing stack trace.
|
protected |
ThrowableFormatOptions(int lines,
String separator,
List<String> packages)
Construct the options for printing stack trace.
|
protected |
ThrowableFormatOptions(List<String> packages)
Construct the options for printing stack trace.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allLines()
Determines if all lines should be printed.
|
boolean |
anyLines()
Determines if any lines should be printed.
|
int |
getLines()
Returns the number of lines to write.
|
List<String> |
getPackages()
Returns the list of packages to filter.
|
String |
getSeparator()
Returns the stack trace separator.
|
boolean |
hasPackages()
Determines if there are any packages to filter.
|
int |
minLines(int maxLines)
Returns the minimum between the lines and the max lines.
|
static ThrowableFormatOptions |
newInstance(String[] options)
Create a new instance based on the array of options.
|
String |
toString() |
protected static final ThrowableFormatOptions DEFAULT
ThrowableFormatOptions
.public static final String CLASS_NAME
public static final String METHOD_NAME
public static final String LINE_NUMBER
public static final String FILE_NAME
public static final String MESSAGE
public static final String LOCALIZED_MESSAGE
protected ThrowableFormatOptions(int lines, String separator, List<String> packages)
lines
- The number of lines.separator
- The stack trace separator.packages
- The packages to filter.protected ThrowableFormatOptions(List<String> packages)
packages
- The packages to filter.protected ThrowableFormatOptions()
public int getLines()
public String getSeparator()
public List<String> getPackages()
public boolean allLines()
public boolean anyLines()
public int minLines(int maxLines)
maxLines
- The maximum number of lines.public boolean hasPackages()
public static ThrowableFormatOptions newInstance(String[] options)
options
- The array of options.Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.