private static Properties parseArguments(String agentArgument, String separator) {
        Properties p = new Properties();
        try {
            String argumentAsLines = agentArgument.replaceAll(separator, "\n");
            p.load(new ByteArrayInputStream(argumentAsLines.getBytes()));
        } catch (IOException e) {
            String s = "Could not load arguments as properties";
            throw new RuntimeException(s, e);
        }
        return p;
    }
Consider the argument string to be a property file (by converting the
splitter character to line feeds), and then reading it like any other
property file.


@param agentArgument
           string given by instrumentation framework
@param separator
           String to convert to line feeds
@return argument converted to properties
slf4j-ext/src/main/java/org/slf4j/agent/AgentPremain.java