Package org.wso2.carbon.utils.logging
Class LoggingUtils
- java.lang.Object
-
- org.wso2.carbon.utils.logging.LoggingUtils
-
@Deprecated public class LoggingUtils extends Object
Deprecated.Tenant specific information is taken form Log4J2 Converters.
-
-
Constructor Summary
Constructors Constructor Description LoggingUtils()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static org.apache.log4j.spi.LoggingEventgetLogEvent(LogRecord record)Deprecated.Return a logging event from the given log recordstatic org.apache.log4j.LevelgetLogLevel(Level level)Deprecated.Return theorg.apache.log4j.Levelfrom the givenjava.util.logging.Levelstatic TenantAwareLoggingEventgetTenantAwareLogEvent(List<Pattern> maskingPatterns, org.apache.log4j.spi.LoggingEvent loggingEvent, int tenantId, String serviceName)Deprecated.Returns a TenantAwareLoggingEvent that wraps the LoggingEvent with tenant specific tenantId and serviceNamestatic TenantAwareLoggingEventgetTenantAwareLogEvent(org.apache.log4j.spi.LoggingEvent loggingEvent, int tenantId, String serviceName)Deprecated.static List<Pattern>loadMaskingPatterns(String maskingFilePath)Deprecated.Method to get the masking patterns (regex) from the properties file.
-
-
-
Method Detail
-
getLogEvent
public static org.apache.log4j.spi.LoggingEvent getLogEvent(LogRecord record)
Deprecated.Return a logging event from the given log record- Parameters:
record- - the log record- Returns:
- - a LoggingEvent
-
getTenantAwareLogEvent
@Deprecated public static TenantAwareLoggingEvent getTenantAwareLogEvent(org.apache.log4j.spi.LoggingEvent loggingEvent, int tenantId, String serviceName)
Deprecated.
-
getTenantAwareLogEvent
public static TenantAwareLoggingEvent getTenantAwareLogEvent(List<Pattern> maskingPatterns, org.apache.log4j.spi.LoggingEvent loggingEvent, int tenantId, String serviceName)
Deprecated.Returns a TenantAwareLoggingEvent that wraps the LoggingEvent with tenant specific tenantId and serviceName- Parameters:
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 event- Returns:
- a TenantAwareLoggingEvent
-
loadMaskingPatterns
public static List<Pattern> loadMaskingPatterns(String maskingFilePath)
Deprecated.Method to get the masking patterns (regex) from the properties file.- Parameters:
maskingFilePath- : The absolute path to the masking properties file.
-
getLogLevel
public static org.apache.log4j.Level getLogLevel(Level level)
Deprecated.Return theorg.apache.log4j.Levelfrom the givenjava.util.logging.Level- Parameters:
level- - thejava.util.logging.Level- Returns:
- - an
org.apache.log4j.Level
-
-