Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export class HeadlessChromiumDriverFactory {
const chromiumArgs = args({
userDataDir,
viewport,
verboseLogging: true,
disableSandbox: this.browserConfig.disableSandbox,
proxy: this.browserConfig.proxy,
});
Expand Down Expand Up @@ -91,7 +90,6 @@ export class HeadlessChromiumDriverFactory {
const chromiumArgs = args({
userDataDir,
viewport,
verboseLogging: this.logger.isVerbose,
disableSandbox: this.browserConfig.disableSandbox,
proxy: this.browserConfig.proxy,
});
Expand Down
14 changes: 4 additions & 10 deletions x-pack/legacy/plugins/reporting/server/lib/level_logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]);
}
}
1 change: 0 additions & 1 deletion x-pack/legacy/plugins/reporting/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export interface BrowserConfig {
server: string;
bypass?: string[];
};
verboseLogging?: boolean;
}

export interface ElementPosition {
Expand Down