Skip to content

Commit

Permalink
Replace console.log with logger.info (#26)
Browse files Browse the repository at this point in the history
* Replace console.log with logger.info

* Add whitespace and units
  • Loading branch information
jbcrail authored Mar 2, 2022
1 parent 36cecc3 commit 37edd80
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/plugins/profiling/server/routes/search_flamechart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ async function queryFlameGraph(
docCount += item.doc_count;
bucketCount++;
});
console.log('took', resEvents.body.took);
console.log('docs', docCount);
console.log('total events', totalCount);
console.log('unique events', bucketCount);
logger.info('query time registered by ES on events ' + resEvents.body.took + 'ms');
logger.info('events document count ' + docCount);
logger.info('total events count ' + totalCount);
logger.info('unique events ' + bucketCount);

const resStackTraces = await logExecutionLatency(
logger,
Expand Down Expand Up @@ -196,7 +196,7 @@ async function queryFlameGraph(
});
}
}
console.log('unique stacktraces', stackTraces.size);
logger.info('unique stacktraces ' + stackTraces.size);

// Create the set of unique FrameIDs.
const stackFrameDocIDs = new Set<string>();
Expand All @@ -205,7 +205,7 @@ async function queryFlameGraph(
stackFrameDocIDs.add(frameID);
}
}
console.log('unique frames', stackFrameDocIDs.size);
logger.info('unique frames ' + stackFrameDocIDs.size);

const resStackFrames = await logExecutionLatency(
logger,
Expand Down Expand Up @@ -241,7 +241,7 @@ async function queryFlameGraph(
executableDocIDs.add(fileID);
}
}
console.log('unique executable IDs', executableDocIDs.size);
logger.info('unique executable IDs ' + executableDocIDs.size);

const resExecutables = await logExecutionLatency(
logger,
Expand Down

0 comments on commit 37edd80

Please sign in to comment.