Package com.hazelcast.logging
Class Log4j2Factory.Log4j2Logger
- java.lang.Object
-
- com.hazelcast.logging.AbstractLogger
-
- com.hazelcast.logging.Log4j2Factory.Log4j2Logger
-
- All Implemented Interfaces:
com.hazelcast.internal.tpcengine.logging.TpcLogger
,ILogger
,com.hazelcast.logging.impl.InternalLogger
- Enclosing class:
- Log4j2Factory
@PrivateApi public static class Log4j2Factory.Log4j2Logger extends AbstractLogger implements com.hazelcast.logging.impl.InternalLogger
-
-
Constructor Summary
Constructors Constructor Description Log4j2Logger(org.apache.logging.log4j.spi.ExtendedLogger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.logging.Level
getLevel()
Gets the logging level.boolean
isLoggable(java.util.logging.Level level)
Checks if a message at the given level is going to be logged by this logger.void
log(LogEvent logEvent)
Logs a LogEvent.void
log(java.util.logging.Level level, java.lang.String message)
Logs a message at the given level.void
log(java.util.logging.Level level, java.lang.String message, java.lang.Throwable thrown)
Logs a message with an associated throwable at the given level.void
setLevel(java.util.logging.Level level)
Sets the level of this logger to the given level.-
Methods inherited from class com.hazelcast.logging.AbstractLogger
fine, fine, fine, finest, finest, finest, info, info, info, isFineEnabled, isFinestEnabled, isInfoEnabled, isSevereEnabled, isWarningEnabled, severe, severe, severe, warning, warning, warning
-
-
-
-
Method Detail
-
setLevel
public void setLevel(java.util.logging.Level level)
Description copied from interface:com.hazelcast.logging.impl.InternalLogger
Sets the level of this logger to the given level.- Specified by:
setLevel
in interfacecom.hazelcast.logging.impl.InternalLogger
- Parameters:
level
- the level to set, can benull
if the underlying logging framework gives some special meaning to it (like inheriting the log level from some parent object).
-
log
public void log(java.util.logging.Level level, java.lang.String message)
Description copied from interface:com.hazelcast.internal.tpcengine.logging.TpcLogger
Logs a message at the given level.- Specified by:
log
in interfacecom.hazelcast.internal.tpcengine.logging.TpcLogger
- Parameters:
level
- the log levelmessage
- the message to log
-
log
public void log(java.util.logging.Level level, java.lang.String message, java.lang.Throwable thrown)
Description copied from interface:com.hazelcast.internal.tpcengine.logging.TpcLogger
Logs a message with an associated throwable at the given level.- Specified by:
log
in interfacecom.hazelcast.internal.tpcengine.logging.TpcLogger
message
- the message to logthrown
- the Throwable associated to the message
-
getLevel
public java.util.logging.Level getLevel()
Description copied from interface:com.hazelcast.internal.tpcengine.logging.TpcLogger
Gets the logging level.- Specified by:
getLevel
in interfacecom.hazelcast.internal.tpcengine.logging.TpcLogger
- Returns:
- the logging level
-
isLoggable
public boolean isLoggable(java.util.logging.Level level)
Description copied from interface:com.hazelcast.internal.tpcengine.logging.TpcLogger
Checks if a message at the given level is going to be logged by this logger.- Specified by:
isLoggable
in interfacecom.hazelcast.internal.tpcengine.logging.TpcLogger
- Parameters:
level
- the log level- Returns:
- true if this logger will log messages for the given level, false otherwise
-
-