HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2017-11-23 bf7f4e8249b5c09d76d8cb7691d3fb30fa868ccd
optimize logging
1 files modified
10 ■■■■ changed files
hsarback/src/de/hsadmin/core/qserv/CommandShell.java 10 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/core/qserv/CommandShell.java
@@ -24,8 +24,14 @@
        int exitCode = 0;
        try {
            String logCommand = command;
            if (stdInput != null)  {
                logCommand += "<<EOF\n" + stdInput + "EOF";
            if (stdInput != null && !"newusers".equals(logCommand))  {
                if (logCommand != null && (logCommand.startsWith("newusers") || logCommand.startsWith("chpasswd"))) {
                    // escape new password !
                    final String[] strings = stdInput.split(":", 3);
                    logCommand += "<<EOF\n" + strings[0] + ":***:" + strings[2] + "EOF";
                } else {
                    logCommand += "<<EOF\n" + stdInput + "EOF";
                }
            }
            logCommand += "\n";
            logger.log(Level.INFO, logCommand);