Package org.keycloak.common.util
Class StackUtil
java.lang.Object
org.keycloak.common.util.StackUtil
- Author:
- hmlnarik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
Returns string representation of the stack trace of the current call without the call to thegetShortStackTrace
itself, and ignoring usually irrelevant calls to methods insun.
andjava.lang.reflect
packages.static Object
getShortStackTrace
(String prefix) Returns string representation of the stack trace of the current call without the call to thegetShortStackTrace
itself, and ignoring usually irrelevant calls to methods insun.
andjava.lang.reflect
packages.static boolean
-
Constructor Details
-
StackUtil
public StackUtil()
-
-
Method Details
-
getShortStackTrace
Returns string representation of the stack trace of the current call without the call to thegetShortStackTrace
itself, and ignoring usually irrelevant calls to methods insun.
andjava.lang.reflect
packages. The stack trace ignores calls before and including the firstorg.jboss.resteasy
method, hence it usually finishes with the method handling respective REST endpoint. Each line of the stack trace is prepended with"\n "
.- Returns:
- If the logger
org.keycloak.STACK_TRACE
is set to trace level, then returns stack trace, else returns emptyStringBuilder
-
getShortStackTrace
Returns string representation of the stack trace of the current call without the call to thegetShortStackTrace
itself, and ignoring usually irrelevant calls to methods insun.
andjava.lang.reflect
packages. The stack trace ignores calls before and including the firstorg.jboss.resteasy
method, hence it usually finishes with the method handling respective REST endpoint.- Parameters:
prefix
- Prefix to prepend to every stack trace line- Returns:
- If the logger
org.keycloak.STACK_TRACE
is set to trace level, then returns stack trace, else returns emptyStringBuilder
-
isShortStackTraceEnabled
public static boolean isShortStackTraceEnabled()
-