Class LoggingUtils


  • @Deprecated
    public class LoggingUtils
    extends Object
    Deprecated.
    Tenant specific information is taken form Log4J2 Converters.
    • Constructor Detail

      • LoggingUtils

        public LoggingUtils()
        Deprecated.
    • 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

        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 content
        tenantId - - tenant Id of the tenant which triggered log event
        serviceName - - 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 the org.apache.log4j.Level from the given java.util.logging.Level
        Parameters:
        level - - the java.util.logging.Level
        Returns:
        - an org.apache.log4j.Level