private static String format(String message, Object... params) {
        message = String.valueOf(message);

        StringBuilder builder = new StringBuilder(message.length() + (16 * params.length));

        int messageStart = 0;
        int index = 0;

        if (params.length == 0) {
            return builder.append(message).toString();
        }

        while (index < params.length) {
            int place = message.indexOf("%s");
            if(place == -1) {
                break;
            }
            builder.append(message.substring(messageStart, place));
            builder.append(params[index++]);
            messageStart = place + 2;
        }

        if(index < params.length) {
            builder.append(" {");
            while(index < params.length) {
                builder.append(", ");
                builder.append(params[index++]);
            }
            builder.append("}");
        }

        return builder.toString();
    }