public static String removeCRLFCharacters(String str) {
        if (str != null) {
            str = str.replace('\n', '_').replace('\r', '_');
        }
        return str;
    }
Class used to encode strings before logging.
modules/siddhi-core/src/main/java/io/siddhi/core/util/StringUtil.java