Class LogUtils
java.lang.Object
com.github.chhorz.openapi.common.util.LogUtils
Internal logging utility class.
- Author:
- chhorz
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLogUtils
(Messager messager, ParserProperties properties) Creates a newLogUtils
instance.LogUtils
(Messager messager, ParserProperties properties, String componentLogGroup) Creates a newLogUtils
instance. -
Method Summary
Modifier and TypeMethodDescriptionconfigureWithComponent
(String componentLogGroup) Creates a clonedLogUtils
class with the given component log group.void
Prints the given log message if the log level is "DEBUG".void
Prints the given log message.void
Prints the given log message.void
Prints 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 newLogUtils
instance.- Parameters:
messager
- the messager from theProcessingEnvironment
properties
- the given parser properties that are required for the log level
-
LogUtils
Creates a newLogUtils
instance.- Parameters:
messager
- the messager from theProcessingEnvironment
properties
- the given parser properties that are required for the log levelcomponentLogGroup
- a mandatory subgroup for the log statements
-
-
Method Details
-
configureWithComponent
Creates a clonedLogUtils
class with the given component log group.- Parameters:
componentLogGroup
- the subgroup for the log statements- Returns:
- a new
LogUtils
class
-
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
-