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

Commit 49f5d95

Browse files
author
Matt Loring
committed
Add LOGPOINT prefix to log point messages
1 parent 4aab7bf commit 49f5d95

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

lib/v8debugapi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ module.exports.create = function(logger_, config_, fileStats_) {
331331
var message = format(breakpoint.logMessageFormat,
332332
breakpoint.evaluatedExpressions.map(JSON.stringify));
333333
logsThisSecond++;
334-
console.log(message);
334+
console.log('LOGPOINT:', message);
335335
if (shouldStop()) {
336336
delete listeners[num];
337337
} else {

test/e2e/test-log-throttling.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ function runTest() {
158158
.then(function(result) {
159159
// If no throttling occurs, we expect ~20 logs since we are logging
160160
// 2x per second over a 10 second period.
161-
var logCount = transcript.split('o is: {"a":[1,"hi",true]}').length - 1;
161+
var logCount =
162+
transcript.split('LOGPOINT: o is: {"a":[1,"hi",true]}').length - 1;
162163
// A log count of greater than 10 indicates that we did not successfully
163164
// pause when the rate of `maxLogsPerSecond` was reached.
164165
assert(logCount < 10);

test/e2e/test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ function runTest() {
225225
assert.ok(arg, 'should find the n argument');
226226
assert.strictEqual(arg.value, '10');
227227
console.log('-- checking log point was hit again');
228-
assert.ok(transcript.split('o is: {"a":[1,"hi",true]}').length > 4);
228+
assert.ok(
229+
transcript.split('LOGPOINT: o is: {"a":[1,"hi",true]}').length > 4);
229230
console.log('Test passed');
230231
process.exit(0);
231232
})

0 commit comments

Comments
 (0)