public class LoggingUtils extends Object
| Constructor and Description |
|---|
LoggingUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.log4j.spi.LoggingEvent |
getLogEvent(LogRecord record)
Return a logging event from the given log record
|
static org.apache.log4j.Level |
getLogLevel(Level level)
Return the
org.apache.log4j.Level from the given
java.util.logging.Level |
static TenantAwareLoggingEvent |
getTenantAwareLogEvent(List<Pattern> maskingPatterns,
org.apache.log4j.spi.LoggingEvent loggingEvent,
int tenantId,
String serviceName)
Returns a TenantAwareLoggingEvent that wraps the LoggingEvent with tenant specific tenantId
and serviceName
|
static TenantAwareLoggingEvent |
getTenantAwareLogEvent(org.apache.log4j.spi.LoggingEvent loggingEvent,
int tenantId,
String serviceName)
Deprecated.
|
static List<Pattern> |
loadMaskingPatterns(String maskingFilePath)
Method to get the masking patterns (regex) from the properties file.
|
public static org.apache.log4j.spi.LoggingEvent getLogEvent(LogRecord record)
record - - the log record@Deprecated public static TenantAwareLoggingEvent getTenantAwareLogEvent(org.apache.log4j.spi.LoggingEvent loggingEvent, int tenantId, String serviceName)
public static TenantAwareLoggingEvent getTenantAwareLogEvent(List<Pattern> maskingPatterns, org.apache.log4j.spi.LoggingEvent loggingEvent, int tenantId, String serviceName)
maskingPatterns - - The masking patterns which the log message should be masked.loggingEvent - - The LoggingEvent with the log contenttenantId - - tenant Id of the tenant which triggered log eventserviceName - - service name of the current log eventpublic static List<Pattern> loadMaskingPatterns(String maskingFilePath)
maskingFilePath - : The absolute path to the masking properties file.public static org.apache.log4j.Level getLogLevel(Level level)
org.apache.log4j.Level from the given
java.util.logging.Levellevel - - the java.util.logging.Levelorg.apache.log4j.LevelCopyright © 2019 WSO2 Inc. All Rights Reserved.