diff --git a/x-pack/legacy/plugins/reporting/server/browsers/chromium/driver_factory/args.ts b/x-pack/legacy/plugins/reporting/server/browsers/chromium/driver_factory/args.ts index a30e3a8bbba6d..dc79a6b9db2c1 100644 --- a/x-pack/legacy/plugins/reporting/server/browsers/chromium/driver_factory/args.ts +++ b/x-pack/legacy/plugins/reporting/server/browsers/chromium/driver_factory/args.ts @@ -11,16 +11,9 @@ interface LaunchArgs { viewport: BrowserConfig['viewport']; disableSandbox: BrowserConfig['disableSandbox']; proxy: BrowserConfig['proxy']; - verboseLogging: BrowserConfig['verboseLogging']; } -export const args = ({ - userDataDir, - viewport, - disableSandbox, - proxy: proxyConfig, - verboseLogging, -}: LaunchArgs) => { +export const args = ({ userDataDir, viewport, disableSandbox, proxy: proxyConfig }: LaunchArgs) => { const flags = [ // Disable built-in Google Translate service '--disable-translate', @@ -59,11 +52,9 @@ export const args = ({ flags.push('--no-sandbox'); } - // TODO remove conditional - if (verboseLogging) { - flags.push('--enable-logging'); - flags.push('--v=1'); - } + // log to chrome_debug.log + flags.push('--enable-logging'); + flags.push('--v=1'); if (process.platform === 'linux') { flags.push('--disable-setuid-sandbox'); diff --git a/x-pack/legacy/plugins/reporting/server/browsers/chromium/driver_factory/index.ts b/x-pack/legacy/plugins/reporting/server/browsers/chromium/driver_factory/index.ts index baa25b1662abb..65d8229a6087a 100644 --- a/x-pack/legacy/plugins/reporting/server/browsers/chromium/driver_factory/index.ts +++ b/x-pack/legacy/plugins/reporting/server/browsers/chromium/driver_factory/index.ts @@ -54,7 +54,6 @@ export class HeadlessChromiumDriverFactory { const chromiumArgs = args({ userDataDir, viewport, - verboseLogging: true, disableSandbox: this.browserConfig.disableSandbox, proxy: this.browserConfig.proxy, }); @@ -91,7 +90,6 @@ export class HeadlessChromiumDriverFactory { const chromiumArgs = args({ userDataDir, viewport, - verboseLogging: this.logger.isVerbose, disableSandbox: this.browserConfig.disableSandbox, proxy: this.browserConfig.proxy, }); diff --git a/x-pack/legacy/plugins/reporting/server/lib/level_logger.ts b/x-pack/legacy/plugins/reporting/server/lib/level_logger.ts index 810ccf253943c..c67a9cd32d50d 100644 --- a/x-pack/legacy/plugins/reporting/server/lib/level_logger.ts +++ b/x-pack/legacy/plugins/reporting/server/lib/level_logger.ts @@ -13,19 +13,17 @@ const trimStr = (toTrim: string) => { export class LevelLogger { private _logger: any; private _tags: string[]; - private _isVerbose: boolean; public warn: (msg: string, tags?: string[]) => void; - static createForServer(server: any, tags: string[], isVerbose = false) { + static createForServer(server: any, tags: string[]) { const serverLog: ServerLog = (tgs: string[], msg: string) => server.log(tgs, msg); - return new LevelLogger(serverLog, tags, isVerbose); + return new LevelLogger(serverLog, tags); } - constructor(logger: ServerLog, tags: string[], isVerbose: boolean) { + constructor(logger: ServerLog, tags: string[]) { this._logger = logger; this._tags = tags; - this._isVerbose = isVerbose; /* * This shortcut provides maintenance convenience: Reporting code has been @@ -50,11 +48,7 @@ export class LevelLogger { this._logger([...this._tags, ...tags, 'info'], trimStr(msg)); } - public get isVerbose() { - return this._isVerbose; - } - public clone(tags: string[]) { - return new LevelLogger(this._logger, [...this._tags, ...tags], this._isVerbose); + return new LevelLogger(this._logger, [...this._tags, ...tags]); } } diff --git a/x-pack/legacy/plugins/reporting/types.d.ts b/x-pack/legacy/plugins/reporting/types.d.ts index f1ddab8689569..b777773d6aa5f 100644 --- a/x-pack/legacy/plugins/reporting/types.d.ts +++ b/x-pack/legacy/plugins/reporting/types.d.ts @@ -48,7 +48,6 @@ export interface BrowserConfig { server: string; bypass?: string[]; }; - verboseLogging?: boolean; } export interface ElementPosition {