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 ILoggerObtains aloggerfor the givenclazz.static ILoggerObtains aloggerof the givenname.static LoggerFactorynewLoggerFactory(String preferredType) Creates alogger factoryinstance of the given preferred type.static ILoggernoLogger()
-
Method Details
-
getLogger
Obtains aloggerfor the givenclazz.- Parameters:
clazz- the class to obtain the logger for.- Returns:
- the obtained logger.
-
getLogger
Obtains aloggerof 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 factoryinstance 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.classsystem 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,StandardLoggerFactoryinstance will be returned instead.- Parameters:
preferredType- the preferred type of the logger factory to create.- Returns:
- the created logger factory.
-