core(driver): guard verbose logic behind log.isVerbose check (#14086)
This commit is contained in:
Родитель
4574943041
Коммит
3ba17a12e5
|
@ -164,7 +164,8 @@ function waitForNetworkIdle(session, networkMonitor, networkQuietOptions) {
|
|||
const inflightRecords = networkMonitor.getInflightRequests();
|
||||
// If there are more than 20 inflight requests, load is still in full swing.
|
||||
// Wait until it calms down a bit to be a little less spammy.
|
||||
if (inflightRecords.length < 20) {
|
||||
if (log.isVerbose() && inflightRecords.length < 20 && inflightRecords.length > 0) {
|
||||
log.verbose('waitFor', `=== Waiting on ${inflightRecords.length} requests to finish`);
|
||||
for (const record of inflightRecords) {
|
||||
log.verbose('waitFor', `Waiting on ${record.url.slice(0, 120)} to finish`);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ declare module 'lighthouse-logger' {
|
|||
args?: any[];
|
||||
}
|
||||
export function setLevel(level: string): void;
|
||||
export function isVerbose(): boolean;
|
||||
export function formatProtocol(prefix: string, data: Object, level?: string): void;
|
||||
export function log(title: string, ...args: any[]): void;
|
||||
export function warn(title: string, ...args: any[]): void;
|
||||
|
|
Загрузка…
Ссылка в новой задаче