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

org.cloudfoundry.identity.uaa.logging.LogSanitizerUtil Maven / Gradle / Ivy

There is a newer version: 4.30.0
Show newest version
package org.cloudfoundry.identity.uaa.logging;

public class LogSanitizerUtil {

    public static final String SANITIZED_FLAG = "[SANITIZED]";

    public static String sanitize(String original) {
        String cleaned = original.replace("\r","|")
                .replace("\n","|")
                .replace("\t","|");

        if (!cleaned.equals(original)) {
            cleaned += SANITIZED_FLAG;
        }

        return cleaned;
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy