Package tilda.utils
Class LogUtil
- java.lang.Object
-
- tilda.utils.LogUtil
-
public class LogUtil extends java.lang.Object- Author:
- ldh
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.logging.log4j.Level_originalLogLevelprotected static org.apache.logging.log4j.LoggerLOG
-
Constructor Summary
Constructors Constructor Description LogUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringlogError(org.apache.logging.log4j.Logger l, java.lang.String msg)static voidlogThrowables(org.apache.logging.log4j.Logger log, java.lang.Throwable T, int causeLevel)Logs the Throwable using the provided Logger, then logs the throwable causes up to causeLevel.static voidresetLogLevel()static voidsetLogLevel(org.apache.logging.log4j.Level NewLevel)
-
-
-
Method Detail
-
setLogLevel
public static void setLogLevel(org.apache.logging.log4j.Level NewLevel)
-
resetLogLevel
public static void resetLogLevel()
-
logThrowables
public static final void logThrowables(org.apache.logging.log4j.Logger log, java.lang.Throwable T, int causeLevel)Logs the Throwable using the provided Logger, then logs the throwable causes up to causeLevel. If causeLevel is 0, then no sub-causes are logged. If there are no sub-causes, then causeLevel is ignored.- Parameters:
log- the Logger to log the Throwable against, using catching()T- the Throwable to logcauseLevel- the number of levels deep to also log the Throwable's sub causes if any.
-
logError
public static java.lang.String logError(org.apache.logging.log4j.Logger l, java.lang.String msg)
-
-