All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.icthh.xm.commons.logging.util.MaskingLayout Maven / Gradle / Ivy

There is a newer version: 4.0.17
Show newest version
package com.icthh.xm.commons.logging.util;

import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Layout;
import ch.qos.logback.core.LayoutBase;
import com.icthh.xm.commons.logging.config.LoggingConfigService;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class MaskingLayout extends LayoutBase {

    private final Layout layout;
    private final LoggingConfigService loggingConfigService;

    @Override
    public String doLayout(ILoggingEvent event) {
        return maskMessage(layout.doLayout(event));
    }

    private String maskMessage(String message) {
        return loggingConfigService.getMaskingService().maskMessage(message);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy