Package org.infinispan.commons.logging
Interface Log
- All Superinterfaces:
org.jboss.logging.BasicLogger
- All Known Implementing Classes:
Log_$logger
@MessageLogger(projectCode="ISPN")
public interface Log
extends org.jboss.logging.BasicLogger
Infinispan's log abstraction layer on top of JBoss Logging.
It contains explicit methods for all INFO or above levels so that they can
be internationalized. For the commons module, message ids ranging from 0901
to 1000 inclusively have been reserved.
Log log = LogFactory.getLog( getClass() );
The above will get
you an instance of Log, which can be used to generate log messages
either via JBoss Logging which then can delegate to Log4J (if the libraries
are present) or (if not) the built-in JDK logger.
In addition to the 6 log levels available, this framework also supports
parameter interpolation, similar to the JDKs String.format(String, Object...)
method. What this means is, that the following block:
if (log.isTraceEnabled()) { log.trace("This is a message " + message + " and some other value is " + value); }
... could be replaced with ...
if (log.isTraceEnabled()) log.tracef("This is a message %s and some other value is %s", message, value);
This greatly enhances code readability.
If you are passing a Throwable, note that this should be passed in
before the vararg parameter list.
- Since:
- 4.0
- Author:
- Manik Surtani
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterCompletionFailed
(String synchronization, Throwable t) attributeMustBeGreaterThanZero
(Number value, Enum<?> attribute) attributeSetDuplicateAttribute
(String name, String setName) void
beforeCompletionFailed
(String synchronization, Throwable t) cannotDecodeFormURLContent
(Object content) cannotFindResource
(String fileName) cannotInstantiateClass
(String classname, Throwable t) void
cannotLoadMimeTypes
(String mimeTypes) classNotInAllowList
(String className) conversionNotSupported
(Object content, String fromMediaType, String toMediaType) counterOurOfBounds
(String bound) void
deprecatedProperty
(String oldName, String newName) void
errorEncoding
(Object content, MediaType mediaType) void
void
void
errorTranscoding
(String content, MediaType contentType, MediaType requestType, Throwable t) featureDisabled
(String feature) void
ignoringException
(String methodName, String exceptionName, Throwable t) illegalBooleanValue
(String value) illegalEnumValue
(String value, EnumSet<?> set) illegalValueThreadPoolParameter
(String parameter, String requirement) incompatibleAttribute
(String parentName, String name, String v1, String v2) invalidConfiguration
(String name) invalidCounterType
(String expected, String actual) invalidMediaType
(String expected, String actual) invalidMediaTypeListCommaAtEnd
(String mediaType) invalidMediaTypeListCommaMissing
(String mediaType) invalidMediaTypeParam
(String mediaType, String param) invalidMediaTypeSubtype
(String mediaType) invalidTextContent
(Object content) invalidWeight
(Object weight) noAttribute
(String name, String element) noAttributeCopierForType
(Class<?> klass) noSuchAliasInKeyStore
(String keyAlias, String keyStoreFileName) noSuchAttribute
(String name, String setName) void
void
void
protectedAttribute
(String name) protectedAttributeSet
(String name) void
void
telemetryLoaded
(Object telemetry) void
unableToConvertStringPropertyToBoolean
(String value, boolean defaultValue) void
unableToConvertStringPropertyToEnum
(String value, String defaultValue) void
unableToConvertStringPropertyToInt
(String value, int defaultValue) void
unableToConvertStringPropertyToLong
(String value, long defaultValue) void
unableToLoadClass
(String classname, String classloaders, Throwable cause) unableToLoadFileUsingScheme
(String scheme) unableToUnwrap
(Object o, Class<?> clazz) unableToUnwrapAny
(String objs, Class<?> clazz) undefinedCounter
(String name) void
unsupportedConversion
(String content, MediaType requestType) unsupportedConversion
(String content, MediaType contentType, MediaType requestType) void
xaResourceEndFailed
(String xaResource, Throwable t) Methods inherited from interface org.jboss.logging.BasicLogger
debug, debug, debug, debug, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugf, debugv, debugv, debugv, debugv, debugv, debugv, debugv, debugv, error, error, error, error, errorf, errorf, errorf, errorf, errorf, errorf, errorf, errorf, errorv, errorv, errorv, errorv, errorv, errorv, errorv, errorv, fatal, fatal, fatal, fatal, fatalf, fatalf, fatalf, fatalf, fatalf, fatalf, fatalf, fatalf, fatalv, fatalv, fatalv, fatalv, fatalv, fatalv, fatalv, fatalv, info, info, info, info, infof, infof, infof, infof, infof, infof, infof, infof, infov, infov, infov, infov, infov, infov, infov, infov, isDebugEnabled, isEnabled, isInfoEnabled, isTraceEnabled, log, log, log, log, logf, logf, logf, logf, logf, logf, logf, logf, logf, logf, logf, logf, logv, logv, logv, logv, logv, logv, logv, logv, logv, logv, logv, logv, trace, trace, trace, trace, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracef, tracev, tracev, tracev, tracev, tracev, tracev, tracev, tracev, warn, warn, warn, warn, warnf, warnf, warnf, warnf, warnf, warnf, warnf, warnf, warnv, warnv, warnv, warnv, warnv, warnv, warnv, warnv
-
Field Details
-
LOG_ROOT
- See Also:
-
CONFIG
-
CONTAINER
-
SECURITY
-
-
Method Details
-
propertyCouldNotBeReplaced
@LogMessage(level=WARN) @Message(value="Property %s could not be replaced as intended!", id=901) void propertyCouldNotBeReplaced(String line) -
ignoringException
-
sslInitializationException
@Message(value="Error while initializing SSL context", id=904) CacheConfigurationException sslInitializationException(@Cause Throwable e) -
unableToLoadClass
-
unableToConvertStringPropertyToInt
@LogMessage(level=WARN) @Message(value="Unable to convert string property [%s] to an int! Using default value of %d", id=906) void unableToConvertStringPropertyToInt(String value, int defaultValue) -
unableToConvertStringPropertyToLong
@LogMessage(level=WARN) @Message(value="Unable to convert string property [%s] to a long! Using default value of %d", id=907) void unableToConvertStringPropertyToLong(String value, long defaultValue) -
unableToConvertStringPropertyToBoolean
@LogMessage(level=WARN) @Message(value="Unable to convert string property [%s] to a boolean! Using default value of %b", id=908) void unableToConvertStringPropertyToBoolean(String value, boolean defaultValue) -
unableToUnwrap
@Message(value="Unwrapping %s to a type of %s is not a supported", id=909) IllegalArgumentException unableToUnwrap(Object o, Class<?> clazz) -
illegalValueThreadPoolParameter
@Message(value="Illegal value for thread pool parameter(s) %s, it should be: %s", id=910) CacheConfigurationException illegalValueThreadPoolParameter(String parameter, String requirement) -
unableToUnwrapAny
@Message(value="Unwrapping of any instances in %s to a type of %s is not a supported", id=911) IllegalArgumentException unableToUnwrapAny(String objs, Class<?> clazz) -
unprotectedAttributeSet
@Message(value="Expecting a protected configuration for %s", id=912) IllegalStateException unprotectedAttributeSet(String name) -
protectedAttributeSet
@Message(value="Expecting an unprotected configuration for %s", id=913) IllegalStateException protectedAttributeSet(String name) -
attributeSetDuplicateAttribute
@Message(value="Duplicate attribute \'%s\' in attribute set \'%s\'", id=914) IllegalArgumentException attributeSetDuplicateAttribute(String name, String setName) -
noSuchAttribute
@Message(value="No such attribute \'%s\' in attribute set \'%s\'", id=915) IllegalArgumentException noSuchAttribute(String name, String setName) -
noAttributeCopierForType
@Message(value="No attribute copier for type \'%s\'", id=916) IllegalArgumentException noAttributeCopierForType(Class<?> klass) -
cannotFindResource
@Message(value="Cannot find resource \'%s\'", id=918) IOException cannotFindResource(String fileName) -
multipleConfigurationValidationErrors
@Message(value="Multiple errors encountered while validating configuration", id=919) CacheConfigurationException multipleConfigurationValidationErrors() -
unableToLoadFileUsingScheme
@Message(value="Unable to load file using scheme %s", id=920) UnsupportedOperationException unableToLoadFileUsingScheme(String scheme) -
noSuchAliasInKeyStore
@Message(value="The alias \'%s\' does not exist in the key store \'%s\'", id=921) SecurityException noSuchAliasInKeyStore(String keyAlias, String keyStoreFileName) -
errorRollingBack
@LogMessage(level=ERROR) @Message(value="Exception during rollback", id=922) void errorRollingBack(@Cause Throwable e) -
errorEnlistingResource
@LogMessage(level=ERROR) @Message(value="Error enlisting resource", id=923) void errorEnlistingResource(@Cause Throwable e) -
beforeCompletionFailed
-
unexpectedErrorFromResourceManager
@LogMessage(level=ERROR) @Message(value="Unexpected error from resource manager!", id=925) void unexpectedErrorFromResourceManager(@Cause Throwable t) -
afterCompletionFailed
-
errorCommittingTx
@LogMessage(level=WARN) @Message(value="exception while committing", id=927) void errorCommittingTx(@Cause Throwable e) -
xaResourceEndFailed
-
missingMediaType
-
invalidMediaTypeSubtype
@Message(value="Invalid media type \'%s\': must contain a type and a subtype separated by \'/\'", id=930) EncodingException invalidMediaTypeSubtype(String mediaType) -
invalidMediaTypeParam
@Message(value="Invalid media type \'%s\': invalid param \'%s\'", id=931) EncodingException invalidMediaTypeParam(String mediaType, String param) -
invalidMediaTypeListCommaMissing
@Message(value="Invalid media type list \'%s\': comma expected", id=932) EncodingException invalidMediaTypeListCommaMissing(String mediaType) -
invalidMediaTypeListCommaAtEnd
@Message(value="Invalid media type list \'%s\': type expected after comma", id=933) EncodingException invalidMediaTypeListCommaAtEnd(String mediaType) -
errorTranscoding
@Message(value="Errors converting \'%s\' from \'%s\' to \'%s\'", id=934) EncodingException errorTranscoding(String content, MediaType contentType, MediaType requestType, @Cause Throwable t) -
invalidWeight
@Message(value="Invalid Weight \'%s\'. Supported values are between 0 and 1.0", id=935) EncodingException invalidWeight(Object weight) -
classNotInAllowList
@Message(value="Class \'%s\' blocked by deserialization allow list. Adjust the configuration serialization allow list regular expression to include this class.", id=936) CacheException classNotInAllowList(String className) -
invalidMediaType
@Message(value="Invalid media type. Expected \'%s\' but got \'%s\'", id=937) EncodingException invalidMediaType(String expected, String actual) -
invalidTextContent
@Message(value="Invalid text content \'%s\'", id=938) EncodingException invalidTextContent(Object content) -
conversionNotSupported
@Message(value="Conversion of content \'%s\' from \'%s\' to \'%s\' not supported", id=939) EncodingException conversionNotSupported(Object content, String fromMediaType, String toMediaType) -
cannotDecodeFormURLContent
@Message(value="Invalid application/x-www-form-urlencoded content: \'%s\'", id=940) EncodingException cannotDecodeFormURLContent(Object content) -
errorEncoding
@Message(value="Error encoding content \'%s\' to \'%s\'", id=941) EncodingException errorEncoding(Object content, MediaType mediaType) -
unableToConvertStringPropertyToEnum
-
featureDisabled
@Message(value="Feature %s is disabled!", id=944) CacheConfigurationException featureDisabled(String feature) -
openSSLAvailable
@LogMessage(level=INFO) @Message(value="Using OpenSSL Provider", id=946) void openSSLAvailable() -
openSSLNotAvailable
@LogMessage(level=INFO) @Message(value="Using Java SSL Provider", id=947) void openSSLNotAvailable() -
unsupportedConversion
@Message(value="Unsupported conversion of \'%s\' from \'%s\' to \'%s\'", id=948) EncodingException unsupportedConversion(String content, MediaType contentType, MediaType requestType) -
unsupportedConversion
@Message(value="Unsupported conversion of \'%s\' to \'%s\'", id=949) EncodingException unsupportedConversion(String content, MediaType requestType) -
encodingNotSupported
@Message(value="Encoding \'%s\' is not supported", id=950) EncodingException encodingNotSupported(String enc) -
attributeMustBeGreaterThanZero
@Message(value="Invalid value %s for attribute %s: must be a number greater than zero", id=951) CacheConfigurationException attributeMustBeGreaterThanZero(Number value, Enum<?> attribute) -
telemetryLoaded
@LogMessage(level=INFO) @Message(value="OpenTelemetry instance loaded: %s", id=952) void telemetryLoaded(Object telemetry) -
telemetryDisabled
@LogMessage(level=INFO) @Message(value="OpenTelemetry integration is disabled", id=953) void telemetryDisabled() -
errorOnLoadingTelemetry
@LogMessage(level=WARN) @Message(value="OpenTelemetry cannot be configured", id=954) void errorOnLoadingTelemetry() -
illegalBooleanValue
@Message(value="\'%s\' is not a valid boolean value (true|false|yes|no|y|n|on|off)", id=955) IllegalArgumentException illegalBooleanValue(String value) -
illegalEnumValue
@Message(value="\'%s\' is not one of %s", id=956) IllegalArgumentException illegalEnumValue(String value, EnumSet<?> set) -
cannotLoadMimeTypes
@LogMessage(level=ERROR) @Message(value="Cannot load %s", id=957) void cannotLoadMimeTypes(String mimeTypes) -
cannotParseQuantity
@Message(value="Cannot parse bytes quantity %s", id=958) IllegalArgumentException cannotParseQuantity(String str) -
deprecatedProperty
-
noAttribute
@Message(value="No attribute \'%s\' in \'%s\'", id=960) IllegalArgumentException noAttribute(String name, String element) -
incompatibleAttribute
@Message(value="Incompatible attribute \'%s.%s\' existing value=\'%s\', new value=\'%s\'", id=961) IllegalArgumentException incompatibleAttribute(String parentName, String name, String v1, String v2) -
protectedAttribute
@Message(value="Cannot modify protected attribute \'%s\'", id=962) IllegalStateException protectedAttribute(String name) -
invalidConfiguration
@Message(value="Invalid configuration in \'%s\'", id=963) IllegalArgumentException invalidConfiguration(String name) -
counterOurOfBounds
@Message(value="%s reached.", id=29501) CounterOutOfBoundsException counterOurOfBounds(String bound) -
invalidCounterType
@Message(value="Invalid counter type. Expected=%s but got %s", id=29514) CounterException invalidCounterType(String expected, String actual) -
undefinedCounter
@Message(value="Counter \'%s\' is not defined.", id=29516) CounterException undefinedCounter(String name) -
invalidCounterTypeEncoded
@Message(value="WEAK and BOUNDED encoded flag isn\'t supported!", id=29522) CounterException invalidCounterTypeEncoded() -
cannotInstantiateClass
@Message("Cannot instantiate class \'%s\'") CacheConfigurationException cannotInstantiateClass(String classname, @Suppressed Throwable t)
-