public class PolicyLogger extends Object
Modifier and Type | Field and Description |
---|---|
static com.att.eelf.configuration.EELFLogger.Level |
AUDIT_LEVEL |
static String |
CLASS_NAME |
static com.att.eelf.configuration.EELFLogger.Level |
DEBUG_LEVEL |
static com.att.eelf.configuration.EELFLogger.Level |
ERROR_LEVEL |
static com.att.eelf.configuration.EELFLogger.Level |
METRICS_LEVEL |
Constructor and Description |
---|
PolicyLogger() |
Modifier and Type | Method and Description |
---|---|
static void |
audit(Object arg0)
Records only one String message
|
static void |
audit(String className,
Object arg0)
Records only one String message with its class name
|
static void |
creatAuditEventTrackingRecord(String eventId,
String rule,
String policyVersion)
Records the ending time of the event with its request Id as the key
|
static void |
creatAuditEventTrackingRecord(UUID eventId,
String rule)
Records the ending time of the event with its request Id as the key
|
static void |
debug(MessageCodes msg,
String... arguments)
Records a message with passed in message code and a list of string values
|
static void |
debug(MessageCodes msg,
String className,
Throwable arg0,
String... arguments)
Records a message with passed in message code, class name, Throwable object, a list of string values
|
static void |
debug(MessageCodes msg,
Throwable arg0,
String... arguments)
Records a message with passed in message code, hrowable object, a list of string values
|
static void |
debug(Object arg0)
Records only one String message
|
static void |
debug(String arg0)
Records only one String message
|
static void |
debug(String className,
String arg0)
Records only one String message with its class name
|
static void |
error(MessageCodes msg,
String... arguments)
Records a message with passed in message code and a list of string values
|
static void |
error(MessageCodes msg,
String className,
Throwable arg0,
String... arguments)
Records a message with passed in message code, class name, Throwable object, a list of string values
|
static void |
error(MessageCodes msg,
Throwable arg0,
String... arguments)
Records a message with passed in message code, Throwable object, a list of string values
|
static void |
error(Object arg0)
Records only one String message
|
static void |
error(String arg0)
Records only one String message
|
static void |
error(String className,
String arg0)
Records only one String message with its class name
|
static EventTrackInfo |
getEventTracker() |
static String |
getTransId()
Returns current transaction Id used in MDC
|
static void |
info(MessageCodes msg,
String... arguments)
Records the Info event with String [] arguments
|
static void |
info(MessageCodes msg,
String className,
String... arguments)
Records the Info event with String [] arguments
|
static void |
info(MessageCodes msg,
String className,
Throwable arg0,
String... arguments)
Records a message with passed in message code, class name, Throwable object, a list of string values
|
static void |
info(MessageCodes msg,
Throwable arg0,
String... arguments)
Records a message with passed in message code, Throwable object, a list of string values
|
static void |
info(Object arg0)
Records only one String message
|
static void |
info(String arg0)
Records only one String message without its class name passed in
|
static void |
info(String className,
String arg0)
Records only one String message with its class name
|
static LoggerType |
init(Properties properties)
Loads all the attributes from policyLogger.properties file
|
static boolean |
isAuditEnabled()
returns true for enabled, false for not enabled
|
static boolean |
isDebugEnabled()
returns true for enabled, false for not enabled
|
static boolean |
isErrorEnabled()
returns true for enabled, false for not enabled
|
static boolean |
isInfoEnabled()
returns true for enabled, false for not enabled
|
static boolean |
isInfoEnabled1()
returns true for enabled, false for not enabled
|
static boolean |
isOverrideLogbackLevel()
Returns true for overriding logback levels; returns false for not
|
static boolean |
isWarnEnabled()
returns true for enabled, false for not enabled
|
static void |
metrics(Object arg0)
Records the metrics event with a String message
|
static void |
metrics(String arg0)
Records the metrics event with a String message
|
static void |
metrics(String className,
Object arg0)
Records the metrics event with a class name and a String message
|
static void |
metricsPrintln(String arg0)
Records the metrics event with a String message
|
static void |
postMDCInfoForEvent(Object o)
Sets transaction Id to MDC
|
static String |
postMDCInfoForEvent(String transId)
Populates MDC info
|
static String |
postMDCInfoForTriggeredRule(String transId)
Resets transaction Id in MDC for the rule triggered by this event
|
static void |
postMDCUUIDForTriggeredRule(Object o)
Resets transaction Id in MDC for the rule triggered by this event
|
static void |
recordAuditEventEnd(String eventId,
String rule)
Records the ending time of the event with its request Id as the key
|
static void |
recordAuditEventEnd(String eventId,
String rule,
String policyVersion)
Records the ending time of the event with its request Id as the key
|
static void |
recordAuditEventEnd(UUID eventId,
String rule)
Records the ending time of the event with its request Id as the key
|
static void |
recordAuditEventEnd(UUID eventId,
String rule,
String policyVersion)
Records the ending time of the event with its request Id as the key
|
static void |
recordAuditEventStart(String eventId)
Records the starting time of the event with its request Id as the key
|
static void |
recordAuditEventStart(UUID eventId)
Records the starting time of the event with its request Id as the key
|
static void |
recordAuditEventStartToEnd(String eventId,
String rule,
Instant startTime,
Instant endTime,
String policyVersion)
Records the audit with an event starting and ending times
|
static void |
recordMetricEvent(String arg0)
Records a String message for metrics logs
|
static void |
recordMetricEvent(String eventId,
String arg1)
Records the metrics with an event Id and log message
|
static void |
recordMetricEvent(String eventId,
String className,
String arg1)
Records the metrics with an event Id, class name and log message
|
static void |
recordMetricEvent(UUID eventId,
String arg1)
Records the metrics with an event Id and log message
|
static void |
setAuditLevel(String auditLevel)
Sets Audit OFF or ON
|
static void |
setDebugLevel(String debugLevel)
Sets Debug Level
|
static void |
setErrorLevel(String errorLevel)
Sets Error OFF or ON
|
static void |
setMetricsLevel(String metricsLevel)
Sets Metrics OFF or ON
|
static void |
setOverrideLogbackLevel(boolean odl)
Sets true for overriding logback levels; sets false for not
|
static void |
setServerInfo(String serverHost,
String serverPort)
Sets server information to MDC
|
static void |
setTransId(String transId)
Sets transaction Id to MDC
|
static void |
trace(Object arg0)
Records only one String message
|
static void |
trace(String className,
String arg0)
Records only one String message with its class name
|
static void |
warn(MessageCodes msg,
String... arguments)
Records a message with passed in message code and a list of string values
|
static void |
warn(MessageCodes msg,
String className,
String... arguments)
Records a message with passed in message code, class name and a list of string values
|
static void |
warn(MessageCodes msg,
String className,
Throwable arg0,
String... arguments)
Records a message with passed in message code, Throwable object, a list of string values
|
static void |
warn(MessageCodes msg,
Throwable arg0,
String... arguments)
Records a message with passed in message code, Throwable object, a list of string values
|
static void |
warn(Object arg0)
Records only one String message
|
static void |
warn(String arg0)
Records only one String message without its class name passed in
|
static void |
warn(String className,
String arg0)
Records only one String message with its class name
|
public static com.att.eelf.configuration.EELFLogger.Level DEBUG_LEVEL
public static com.att.eelf.configuration.EELFLogger.Level AUDIT_LEVEL
public static com.att.eelf.configuration.EELFLogger.Level METRICS_LEVEL
public static com.att.eelf.configuration.EELFLogger.Level ERROR_LEVEL
public static String CLASS_NAME
public static String postMDCInfoForEvent(String transId)
transId
- public static void setTransId(String transId)
transId
- public static String getTransId()
public static void postMDCInfoForEvent(Object o)
o
- public static String postMDCInfoForTriggeredRule(String transId)
transId
- public static void postMDCUUIDForTriggeredRule(Object o)
o
- public static void info(MessageCodes msg, String... arguments)
msg
- arguments
- public static void info(MessageCodes msg, String className, String... arguments)
msg
- className
- arguments
- public static void info(String className, String arg0)
className
- arg0
- public static void info(String arg0)
arg0
- public static void info(Object arg0)
arg0
- public static void info(MessageCodes msg, Throwable arg0, String... arguments)
msg
- arg0
- arguments
- public static void info(MessageCodes msg, String className, Throwable arg0, String... arguments)
msg
- className
- arg0
- arguments
- public static void warn(String className, String arg0)
arg0
- log messageclassName
- class namepublic static void warn(Object arg0)
arg0
- public static void warn(String arg0)
arg0
- public static void warn(MessageCodes msg, String... arguments)
msg
- arguments
- public static void warn(MessageCodes msg, String className, String... arguments)
msg
- className
- arguments
- public static void warn(MessageCodes msg, Throwable arg0, String... arguments)
msg
- arg0
- arguments
- public static void warn(MessageCodes msg, String className, Throwable arg0, String... arguments)
msg
- className
- arg0
- arguments
- public static void error(String className, String arg0)
className
- class namearg0
- log messagepublic static void error(String arg0)
arg0
- public static void error(Object arg0)
arg0
- public static void error(MessageCodes msg, Throwable arg0, String... arguments)
msg
- arg0
- arguments
- public static void error(MessageCodes msg, String className, Throwable arg0, String... arguments)
msg
- className
- arg0
- arguments
- public static void error(MessageCodes msg, String... arguments)
msg
- arguments
- public static void debug(MessageCodes msg, String... arguments)
msg
- arguments
- public static void debug(String className, String arg0)
className
- arg0
- public static void debug(String arg0)
arg0
- public static void debug(Object arg0)
arg0
- public static void audit(String className, Object arg0)
className
- arg0
- public static void audit(Object arg0)
arg0
- public static void debug(MessageCodes msg, Throwable arg0, String... arguments)
msg
- arg0
- arguments
- public static void debug(MessageCodes msg, String className, Throwable arg0, String... arguments)
msg
- className
- arg0
- arguments
- public static boolean isDebugEnabled()
public static boolean isErrorEnabled()
public static boolean isWarnEnabled()
public static boolean isInfoEnabled1()
public static boolean isAuditEnabled()
public static boolean isInfoEnabled()
public static void trace(String className, String arg0)
className
- arg0
- public static void trace(Object arg0)
arg0
- public static void recordAuditEventStart(String eventId)
eventId
- public static void recordAuditEventStart(UUID eventId)
eventId
- public static void recordAuditEventEnd(String eventId, String rule)
eventId
- rule
- public static void recordAuditEventEnd(String eventId, String rule, String policyVersion)
eventId
- rule
- policyVersion
- public static void recordAuditEventEnd(UUID eventId, String rule, String policyVersion)
eventId
- rule
- policyVersion
- public static void recordAuditEventEnd(UUID eventId, String rule)
eventId
- rule
- public static void creatAuditEventTrackingRecord(String eventId, String rule, String policyVersion)
eventId
- rule
- policyVersion
- public static void creatAuditEventTrackingRecord(UUID eventId, String rule)
eventId
- rule
- public static EventTrackInfo getEventTracker()
public static void recordAuditEventStartToEnd(String eventId, String rule, Instant startTime, Instant endTime, String policyVersion)
eventId
- rule
- startTime
- endTime
- policyVersion
- public static void recordMetricEvent(String eventId, String arg1)
eventId
- arg1
- public static void recordMetricEvent(String eventId, String className, String arg1)
eventId
- className
- arg1
- public static void recordMetricEvent(UUID eventId, String arg1)
eventId
- arg1
- public static void recordMetricEvent(String arg0)
arg0
- public static void metrics(String arg0)
arg0
- public static void metrics(String className, Object arg0)
arg0
- public static void metrics(Object arg0)
arg0
- public static void metricsPrintln(String arg0)
arg0
- public static LoggerType init(Properties properties)
public static void setDebugLevel(String debugLevel)
public static void setErrorLevel(String errorLevel)
public static void setMetricsLevel(String metricsLevel)
public static void setAuditLevel(String auditLevel)
public static boolean isOverrideLogbackLevel()
public static void setOverrideLogbackLevel(boolean odl)
Copyright © 2017. All rights reserved.