'Selenium DevTools should log ALL but only logs ERROR and VERBOSE, how come?

I'm currently working on a Selenium project and we've just updated to the most recent version of Selenium. Now I wanted to output the result of my console.log()s into the Java console when executing the Selenium test but it seems like it's only logging some specific things.

Code:

webDriver = new ChromeDriver(options);
final DevTools devTools = webDriver.getDevTools();
devTools.createSession();
devTools.send(Log.enable());
devTools.addListener(Log.entryAdded(), logEntry -> {
    LOG.info("[{}]: {}", logEntry.getLevel().toString().toUpperCase(), logEntry.getText());
});

Though while my output in the Chrome window of the test contains VERBOSE messages, console.log()s and two kinds of errors (one HTTP 500 error and one Angular error for something I've done wrong), the only things that actually end up in my Java console are the VERBOSE messages and the HTTP 500 error. Not even the Angular errors but definitely none of the console.log()s.

How do I fix that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source