Package com.hazelcast.logging
Class Logger
java.lang.Object
com.hazelcast.logging.Logger
Provides static utilities to access the global shared logging machinery.
Note: if possible, avoid logging in the global shared context exposed by the utilities of this class,
use LoggingService
instead.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ILogger
Obtains alogger
for the givenclazz
.static ILogger
Obtains alogger
of the givenname
.static LoggerFactory
newLoggerFactory
(String preferredType) Creates alogger factory
instance of the given preferred type.static ILogger
noLogger()
-
Method Details
-
getLogger
Obtains alogger
for the givenclazz
.- Parameters:
clazz
- the class to obtain the logger for.- Returns:
- the obtained logger.
-
getLogger
Obtains alogger
of the givenname
.- Parameters:
name
- the name of the logger to obtain.- Returns:
- the obtained logger.
-
noLogger
- Returns:
- the no operation logger, which ignores all logging requests.
-
newLoggerFactory
Creates alogger factory
instance of the given preferred type.The type of the created logger factory doesn't necessarily match the given preferred type. For example, if
hazelcast.logging.class
system property is set, the configured logger factory class will be used despite the given preferred type. Also, if factory instance construction is failed for some reason,StandardLoggerFactory
instance will be returned instead.- Parameters:
preferredType
- the preferred type of the logger factory to create.- Returns:
- the created logger factory.
-