StackSize

public enum StackSize

Enum values to be passed into withStackTrace to control the maximum number of stack trace elements created.

Note that the precise value returned by getMaxDepth may change over time, but it can be assumed that SMALL <= MEDIUM <= LARGE <= FULL.

Entries

Link copied to clipboard

Produces a small stack suitable for more fine grained debugging. For performance reasons, this is the only stack size suitable for log statements at level INFO or finer, but is may also be useful for WARNING level log statements in cases where context is not as important. For SEVERE log statements, it is advised to use a stack size of MEDIUM or above.

Link copied to clipboard

Produces a medium sized stack suitable for providing contextual information for most log statements at WARNING or above. There should be enough stack trace elements in a MEDIUM stack to provide sufficient debugging context in most cases.

Link copied to clipboard

Produces a large stack suitable for providing highly detailed contextual information. This is most useful for SEVERE log statements which might be processed by external tools and subject to automated analysis.

Link copied to clipboard

Provides the complete stack trace. This is included for situations in which it is known that the upper-most elements of the stack are definitely required for analysis.

Link copied to clipboard

Provides no stack trace, making the withStackTrace() method an effective no-op. This is useful when your stack size is conditional. For example:

Functions

Link copied to clipboard
public static StackSize valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard
public static Array<StackSize> values()

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.