MCPcopy Index your code
hub / github.com/nodejs/node / logImpl

Function logImpl

lib/internal/util/debuglog.js:368–386  ·  view source on GitHub ↗

* @type {LogImpl}

(label, timeFormatted, args)

Source from the content-addressed store, hash-verified

366 * @type {LogImpl}
367 */
368 function logImpl(label, timeFormatted, args) {
369 const pid = process.pid;
370 const colors = { colors: lazyUtilColors().shouldColorize(process.stderr) };
371 const coloredPID = inspect(pid, colors);
372
373 if (args === undefined)
374 process.stderr.write(format('%s %s %s: %s\n', set, coloredPID, label, timeFormatted));
375 else
376 process.stderr.write(
377 format(
378 '%s %s %s: %s\n',
379 set,
380 coloredPID,
381 label,
382 timeFormatted,
383 ...new SafeArrayIterator(args),
384 ),
385 );
386 }
387
388 const traceCategory = `node,node.${StringPrototypeToLowerCase(set)}`;
389 let traceCategoryBuffer;

Callers

nothing calls this directly

Calls 4

lazyUtilColorsFunction · 0.70
inspectFunction · 0.70
formatFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…