Class LogUtils
java.lang.Object
com.github.chhorz.openapi.common.util.LogUtils
Internal logging utility class.
- Author:
- chhorz
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLogUtils(Messager messager, ParserProperties properties) Creates a newLogUtilsinstance.LogUtils(Messager messager, ParserProperties properties, String componentLogGroup) Creates a newLogUtilsinstance. -
Method Summary
Modifier and TypeMethodDescriptionconfigureWithComponent(String componentLogGroup) Creates a clonedLogUtilsclass with the given component log group.voidPrints the given log message if the log level is "DEBUG".voidPrints the given log message.voidPrints the given log message.voidPrints the given log message if the log level is not "ERROR".
-
Field Details
-
OPENAPI_LOG_GROUP
- See Also:
-
DEBUG
- See Also:
-
INFO
- See Also:
-
ERROR
- See Also:
-
-
Constructor Details
-
LogUtils
Creates a newLogUtilsinstance.- Parameters:
messager- the messager from theProcessingEnvironmentproperties- the given parser properties that are required for the log level
-
LogUtils
Creates a newLogUtilsinstance.- Parameters:
messager- the messager from theProcessingEnvironmentproperties- the given parser properties that are required for the log levelcomponentLogGroup- a mandatory subgroup for the log statements
-
-
Method Details
-
configureWithComponent
Creates a clonedLogUtilsclass with the given component log group.- Parameters:
componentLogGroup- the subgroup for the log statements- Returns:
- a new
LogUtilsclass
-
logDebug
Prints the given log message if the log level is "DEBUG".The parameters are related to
String.format(String, Object...).- Parameters:
format- the format stringarguments- arguments for the format string
-
logInfo
Prints the given log message if the log level is not "ERROR".The parameters are related to
String.format(String, Object...).- Parameters:
format- the format stringarguments- arguments for the format string
-
logError
Prints the given log message.The parameters are related to
String.format(String, Object...).- Parameters:
format- the format stringarguments- arguments for the format string
-
logError
Prints the given log message.The parameters are related to
String.format(String, Object...).- Parameters:
format- the format stringexception- the current exception (will be logged viaThrowable.printStackTrace())arguments- arguments for the format string
-