title: Why Selenium's DriverService prints to the error stream? and how to avoid it? - Java
body: <p>I’m using Selenium with <code>ChromeDriverService</code>.</p>
  
  <p>In its base class, <code>DriverService</code>, it starts the service and prints output messages to <code>System.err</code> stream.</p>
  
  <pre><code>private CommandLine process = null;
  
    public void start() throws IOException {
      lock.lock();
      try {
        if (process != null) {
          return;
        }
        process = new CommandLine(this.executable, args.toArray(new String[] {}));
        process.setEnvironmentVariables(environment);
        process.copyOutputTo(System.err);
        process.executeAsync();
  
        waitUntilAvailable();
      } finally {
        lock.unlock();
      }
    }
  </code></pre>
  
  <p>My first question is why to the error stream? It just prints some info messages about the initialization of chrome driver.</p>
  
  <p>In my application, everything that goes to <code>System.err</code> shown in the app’s log with SEVERE log level.</p>
  
  <p>My second question is how can I avoid it and show it as INFO log level?
  It is impossible to extend <code>ChromeDriverService</code> and override the <code>start</code> method, because <code>DriverService</code> contains some private data members that I need and can’t access to.</p>
  
  <p>Thanks.</p>
  
  <p>P.S. I’m using Selenium 2.5.2 but it’s the same concept in the newer versions</p>