Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.logging.log4j.core.impl
Class ThrowableFormatOptions

    java.lang.Object
      org.apache.logging.log4j.core.impl.ThrowableFormatOptions

    public final class ThrowableFormatOptions

extends Object

Contains options which control how a `Throwable` pattern is formatted.

Field Summary
`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`

Constructor Summary
`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.

Method Summary
`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()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### DEFAULT

    protected static final ThrowableFormatOptions DEFAULT

  Default instance of `ThrowableFormatOptions`.

### CLASS_NAME

    public static final String CLASS_NAME

See Also:
  Constant Field Values

### METHOD_NAME

    public static final String METHOD_NAME

See Also:
  Constant Field Values

### LINE_NUMBER

    public static final String LINE_NUMBER

See Also:
  Constant Field Values

### FILE_NAME

    public static final String FILE_NAME

See Also:
  Constant Field Values

### MESSAGE

    public static final String MESSAGE

See Also:
  Constant Field Values

### LOCALIZED_MESSAGE

    public static final String LOCALIZED_MESSAGE

See Also:
  Constant Field Values

Constructor Detail

### ThrowableFormatOptions

    protected ThrowableFormatOptions(int lines,
                                     String separator,
                                     List<String> packages)

  Construct the options for printing stack trace.

  Parameters:
    `lines` - The number of lines.
    `separator` - The stack trace separator.
    `packages` - The packages to filter.

### ThrowableFormatOptions

    protected ThrowableFormatOptions(List<String> packages)

  Construct the options for printing stack trace.

  Parameters:
    `packages` - The packages to filter.

### ThrowableFormatOptions

    protected ThrowableFormatOptions()

  Construct the options for printing stack trace.

Method Detail

### getLines

    public int getLines()

  Returns the number of lines to write.

  Returns:
    The number of lines to write.

### getSeparator

    public String getSeparator()

  Returns the stack trace separator.

  Returns:
    The stack trace separator.

### getPackages

    public List<String> getPackages()

  Returns the list of packages to filter.

  Returns:
    The list of packages to filter.

### allLines

    public boolean allLines()

  Determines if all lines should be printed.

  Returns:
    true for all lines, false otherwise.

### anyLines

    public boolean anyLines()

  Determines if any lines should be printed.

  Returns:
    true for any lines, false otherwise.

### minLines

    public int minLines(int maxLines)

  Returns the minimum between the lines and the max lines.

  Parameters:
    `maxLines` - The maximum number of lines.
  Returns:
    The number of lines to print.

### hasPackages

    public boolean hasPackages()

  Determines if there are any packages to filter.

  Returns:
    true if there are packages, false otherwise.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### newInstance

    public static ThrowableFormatOptions newInstance(String[] options)

  Create a new instance based on the array of options.

  Parameters:
    `options` - The array of options.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2015 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.