title: Selenium - Chrome Performance Logs not Working
body: <p>Hi I have a selenium script that runs and is supposed to give me performance logs. 
  I have a method 'printLog' that should (obviously) print the performance logs. My code will be able to explain in depth exactly what I am trying to do. </p>
  
  <pre><code>static void printLog(String type, RemoteWebDriver driver, String inputURL)  {
  
      ChromeOptions cap = new ChromeOptions();
      LoggingPreferences logP = new LoggingPreferences();
      logP.enable(LogType.PERFORMANCE, Level.ALL);
      cap.setCapability(CapabilityType.LOGGING_PREFS, logP);
  
      List&lt;LogEntry&gt; entries = driver.manage().logs().get(type).getAll();
      System.out.println("\"Input URL\"," + "\"" + inputURL + "\"");
      for (LogEntry entry : entries) {
          // Checks whether this is a webtrends tag and whether it was accepted by the
          // server
  
          if (entry.getMessage().contains("statse") &amp;&amp; entry.getMessage().contains("Network.responseReceived")) {
              String statseString = entry.getMessage();
              // regex for finding all wt tags: WT\..+?(?=&amp;)
              // List&lt;String&gt; allMatches = new ArrayList&lt;String&gt;();
              // Matcher m = Pattern.compile("WT\\..+?(?=&amp;)")
              // .matcher(statseString);
              // while (m.find()) {
              // allMatches.add(m.group());
              // }
              int statseBegin = statseString.indexOf("\"url\":\"") + 1;
              int statseEnd = statseString.indexOf("\"},\"", statseBegin);
              statseString = statseString.substring(statseBegin, statseEnd);
              String[] allMatches = statseString.split("&amp;");
              for (String tags : allMatches) {
                  tags = tags.replaceFirst("=", "ReallyLongUniqueStringWithNoChanceOfOverlap");
                  String tagParts[] = tags.split("ReallyLongUniqueStringWithNoChanceOfOverlap");
  
                  if (tagParts.length &gt; 1) {
                      System.out.println("\"" + tagParts[0] + "\",\"" + tagParts[1] + "\"");
                  } else {
                      System.out.println("\"" + tagParts[0] + ",\"\"");
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>When I run the code, Chrome opens and I get this stacktrace in my console:</p>
  
  <pre><code>Exception in thread "main" org.openqa.selenium.WebDriverException: unknown 
  error: log type 'performance' not found
  (Session info: chrome=69.0.3497.92)
  (Driver info: chromedriver=2.42.591088 
  (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 10.0.16299 
  x86_64) (WARNING: The server did not provide any stacktrace information)
  Command duration or timeout: 0 milliseconds
  Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05- 
  08T15:15:03.216Z'
  System info: host: 'WKSP0009ADAD', ip: '172.17.237.35', os.name: 'Windows 
  10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191'
  Driver info: org.openqa.selenium.remote.RemoteWebDriver
  Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, 
  applicationCacheEnabled: false, browserConnectionEnabled: false, 
  browserName: chrome, chrome: {chromedriverVersion: 2.42.591088 
  (7b2b2dca23cca0..., userDataDir: C:\Users\BPJ0sGW\AppData\Lo...}, 
  cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: 
  {debuggerAddress: localhost:50809}, handlesAlerts: true, hasTouchScreen: 
  false, javascriptEnabled: true, locationContextEnabled: true, 
  mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: 
  false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: 
  false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, 
  unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 
  69.0.3497.92, webStorageEnabled: true, webdriver.remote.sessionid: 
  f50e54d130a8c7e3b3a9cb6984f...}
  Session ID: f50e54d130a8c7e3b3a9cb6984fcb558
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcc 
  essorImpl.java:62)
  atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstr 
  uctorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  atorg.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:
  atorg.openqa.selenium.remote.RemoteLogs.getRemoteEntries(RemoteLogs.java:81)
  at org.openqa.selenium.remote.RemoteLogs.get(RemoteLogs.java:77)
  at demoJenkins.WebTrendsCapture.printLog(WebTrendsCapture.java:141)
  at demoJenkins.WebTrendsCapture.main(WebTrendsCapture.java:114)
  </code></pre>
  
  <p>I can provide more details upon request, but basically I am just trying to figure out why this method returns this error. Thanks.</p>