public final class Callstacks extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isCaller(String className,
String methodName)
Checks the current method is whether invoked by a caller specified by the given class name and method name.
|
static void |
printCallstack(Level logLevel,
String[] carePackages,
String[] exceptablePackages)
Prints call stack with the specified logging level.
|
public static boolean isCaller(String className, String methodName)
className - the given class namemethodName - the given method name, "*" for matching all methodstrue if it is invoked by the specified caller, returns false otherwisepublic static void printCallstack(Level logLevel, String[] carePackages, String[] exceptablePackages)
logLevel - the specified logging levelcarePackages - the specified packages to print, for example, ["org.b3log.latke", "org.b3log.solo"], null to care
nothingexceptablePackages - the specified packages to skip, for example, ["com.sun", "java.io", "org.b3log.solo.filter"],
null to skip nothingCopyright © 2009–2019 B3log. All rights reserved.