public final class Logger extends Object
Note: if possible, avoid logging in the global shared context exposed by the utilities of this class,
use LoggingService
instead.
Modifier and Type | Method and Description |
---|---|
static ILogger |
getLogger(Class clazz)
Obtains a
logger for the given clazz . |
static ILogger |
getLogger(String name)
Obtains a
logger of the given name . |
static LoggerFactory |
newLoggerFactory(String preferredType)
Creates a
logger factory instance of the given preferred type. |
static ILogger |
noLogger() |
public static ILogger getLogger(Class clazz)
logger
for the given clazz
.clazz
- the class to obtain the logger for.public static ILogger getLogger(String name)
logger
of the given name
.name
- the name of the logger to obtain.public static ILogger noLogger()
public static LoggerFactory newLoggerFactory(String preferredType)
logger 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.
preferredType
- the preferred type of the logger factory to create.Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.