Class LoggingSupport
java.lang.Object
org.jboss.resteasy.resteasy_jaxrs.i18n.LoggingSupport
A support utility for creating message loggers and message bundle types. This supports using JBoss Logging 3.5.x and
3.6.x.
- Author:
- James R. Perkins
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TgetBundle(MethodHandles.Lookup lookup, Class<T> bundleClass) Creates a message bundle instance for the specified bundle interface.static <T> TgetMessageLogger(MethodHandles.Lookup lookup, Class<T> loggerClass, String loggerName) Creates a message logger instance for the specified logger interface.
-
Constructor Details
-
LoggingSupport
public LoggingSupport()
-
-
Method Details
-
getMessageLogger
public static <T> T getMessageLogger(MethodHandles.Lookup lookup, Class<T> loggerClass, String loggerName) Creates a message logger instance for the specified logger interface.If JBoss Logging 3.6.x or later is available, this method uses the
Logger.getMessageLogger(MethodHandles.Lookup, Class, String)method. Otherwise, it falls back to the deprecatedLogger.getMessageLogger(Class, String)method for compatibility with JBoss Logging 3.5.x.- Type Parameters:
T- the logger interface type- Parameters:
lookup- the lookup to use, if applicable, for the message loggerloggerClass- the logger interface classloggerName- the logger category name- Returns:
- a message logger instance
-
getBundle
Creates a message bundle instance for the specified bundle interface.If JBoss Logging 3.6.x or later is available, this method uses the
Messages.getBundle(MethodHandles.Lookup, Class)method. Otherwise, it falls back to the deprecatedMessages.getBundle(Class)method for compatibility with JBoss Logging 3.5.x.- Type Parameters:
T- the bundle interface type- Parameters:
lookup- the lookup to use, if applicable, for the message bundlebundleClass- the bundle interface class- Returns:
- a message bundle instance
-