public class LoggerImpl extends java.lang.Object implements Logger
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
loggerClassName |
| Constructor and Description |
|---|
LoggerImpl() |
| Modifier and Type | Method and Description |
|---|---|
LoggerConfig |
getConfig()
Getter for the field
config. |
DestinationLogger |
getDestinationLogger()
Getter for the field
destinationLogger. |
LogStore |
getLogStore()
Getter for the field
logStore. |
LogMeta |
getMeta()
Provides log meta, creates new meta instance if it is null.
|
boolean |
isEnabled(Level level)
Checks if log level provided is enabled or not.
|
boolean |
log()
Performs log operation with meta information stored in logger, through other available methods
such as
Logger.withLevel(Level),Logger.withMeta(LogMeta) etc. |
void |
setConfig(LoggerConfig config)
Setter for the field
config. |
void |
setDestinationLogger(com.google.inject.Provider<DestinationLogger> destinationLogger)
Setter for the field
destinationLogger. |
Logger |
setLoggerName(java.lang.String loggerName)
setLoggerName.
|
void |
setLogStore(LogStore logStore)
Setter for the field
logStore. |
void |
setMeta(LogMeta meta)
Setter for the field
meta. |
Logger |
withLevel(Level level)
Add level meta to logger.
|
Logger |
withMessage(java.lang.String message)
Add message meta to logger.
|
Logger |
withMeta(LogMeta meta)
Add meta information such as level,reason etc to logger.
|
Logger |
withMeta(java.lang.String key,
java.lang.Object value)
Add meta information such as level,reason etc to logger.
|
public boolean isEnabled(Level level)
level - Level to be checked.public Logger withMessage(java.lang.String message)
withMessage in interface Loggermessage - Log message to be used while logging.public Logger withMeta(LogMeta meta)
public Logger withMeta(java.lang.String key, java.lang.Object value)
public boolean log()
Logger.withLevel(Level),Logger.withMeta(LogMeta) etc.public LogMeta getMeta()
public void setMeta(LogMeta meta)
Setter for the field meta.
meta - a LogMeta object.public DestinationLogger getDestinationLogger()
Getter for the field destinationLogger.
DestinationLogger object.@Inject public void setDestinationLogger(com.google.inject.Provider<DestinationLogger> destinationLogger)
Setter for the field destinationLogger.
destinationLogger - a Provider object.public LoggerConfig getConfig()
Getter for the field config.
LoggerConfig object.@Inject public void setConfig(LoggerConfig config)
Setter for the field config.
config - a LoggerConfig object.public LogStore getLogStore()
Getter for the field logStore.
LogStore object.@Inject public void setLogStore(LogStore logStore)
Setter for the field logStore.
logStore - a LogStore object.public Logger setLoggerName(java.lang.String loggerName)
setLoggerName.
setLoggerName in interface LoggerloggerName - a String object.Logger object.Copyright © 2022. All rights reserved.