Thursday, September 21Be an Automation Engineer

Loggers and logging levels in protractor

There are three different loggers in protractor.

  • Driver
  • Server
  • Browser

Driver logger:Driver logger is to capture the messages logged at driver level(Logged by the webdriver).
Server logger: Server logger is to capture the messages logged at selenium server console.
Browser logger: Browser logger is to capture the messages logged in the Browser console.

The logging levels available in protractor are: “OFF”, “SEVERE”, “WARNING”, “INFO”, “CONFIG”, “FINE”, “FINER”, “FINEST”, “ALL”. (Lower -> Higher)

  • “ALL” is the highest logging level.
  • “SEVERE” is the lowest logging level.
  • “OFF” is to turn of the loggers.

The default logging level for all the above Loggers is ‘WARNING’.

We can specify the logging levels in config file using ‘loggingPrefs‘ under capabilities in config file.

%d bloggers like this: