0

I want print log each selenium code line in Eclipse console, so in setUp() I add a new line like this:

//import
import java.util.logging.Level;

//setup
driver.setLogLevel(Level.INFO);

I successfully to printed a log on the console, but it is red.

output console

I know this is no error.

Environment:

  • Mac
  • Eclipse Photon 2018-09 (4.9.0)
  • Selenium-Java 3.5.3 (maven dependency)
  • JUnit

Can I print black on the console ? is it possible ?

frianH
  • 7,295
  • 6
  • 20
  • 45
  • 3
    The logger is writing to 'standard error' which is displayed in red by Eclipse. You can change the standard error colour in the Eclipse Preferences in 'Run/Debug > Console' – greg-449 Aug 27 '19 at 07:21
  • 3
    Or see [here](https://stackoverflow.com/q/194165/2670892) for changing the output stream. – greg-449 Aug 27 '19 at 07:29

1 Answers1

2

The logger is writing to 'standard error' which is displayed in red by Eclipse.

You can change the standard error colour in the Eclipse Preferences in 'Run/Debug > Console' (but this will change the colour for all standard error output).

greg-449
  • 109,219
  • 232
  • 102
  • 145