Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 001158e

Browse files
committed
feat(logger): Add log level configuration (#1451)
1 parent 75af8f4 commit 001158e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,13 @@ export interface Config {
517517
*/
518518
highlightDelay?: number;
519519

520+
/**
521+
* Protractor log level [ERROR, WARN, INFO, DEBUG]
522+
*
523+
* default: INFO
524+
*/
525+
logLevel?: string;
526+
520527
// ---------------------------------------------------------------------------
521528
// ----- The test framework
522529
// --------------------------------------------------

lib/logger.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ export class Logger {
5454
static set(config: Config): void {
5555
if (config.troubleshoot) {
5656
Logger.logLevel = LogLevel.DEBUG;
57+
} else if (config.logLevel) {
58+
Logger.logLevel = (<any>LogLevel)[config.logLevel];
5759
}
5860
}
5961

0 commit comments

Comments
 (0)