Class LoggingUtils
- java.lang.Object
-
- com.evolveum.midpoint.util.logging.LoggingUtils
-
public class LoggingUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description LoggingUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
dumpStackTrace(Class<?>... classesToSkip)
static void
logException(Trace LOGGER, String message, Throwable ex, Object... objects)
Standard way of logging exception: message is presented at ERROR level, stack trace on DEBUG.static void
logExceptionAsWarning(Trace LOGGER, String message, Throwable ex, Object... objects)
Non-critical exceptions (warnings, with details as debug)static void
logExceptionOnDebugLevel(Trace LOGGER, String message, Throwable ex, Object... objects)
Exceptions that shouldn't be even visible on INFO level.static void
logStackTrace(Trace LOGGER, String message)
static void
logUnexpectedException(Trace LOGGER, String message, Throwable ex, Object... objects)
When logging unexpected exception, we always want to see the stack trace (so everything is logged on ERROR level)static void
logUnexpectedException(Trace LOGGER, Throwable ex)
When logging unexpected exception, we always want to see the stack trace (so everything is logged on ERROR level)
-
-
-
Method Detail
-
logException
public static void logException(Trace LOGGER, String message, Throwable ex, Object... objects)
Standard way of logging exception: message is presented at ERROR level, stack trace on DEBUG.
-
logUnexpectedException
public static void logUnexpectedException(Trace LOGGER, String message, Throwable ex, Object... objects)
When logging unexpected exception, we always want to see the stack trace (so everything is logged on ERROR level)
-
logUnexpectedException
public static void logUnexpectedException(Trace LOGGER, Throwable ex)
When logging unexpected exception, we always want to see the stack trace (so everything is logged on ERROR level)
-
logExceptionAsWarning
public static void logExceptionAsWarning(Trace LOGGER, String message, Throwable ex, Object... objects)
Non-critical exceptions (warnings, with details as debug)
-
logExceptionOnDebugLevel
public static void logExceptionOnDebugLevel(Trace LOGGER, String message, Throwable ex, Object... objects)
Exceptions that shouldn't be even visible on INFO level.
-
-