mirror of
https://github.com/nodejs/node.git
synced 2025-05-17 04:03:52 +00:00
![]() PR-URL: https://github.com/nodejs/node/pull/38475 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> |
||
---|---|---|
.. | ||
index.js | ||
LICENSE | ||
package.json | ||
README.md |
proc-log
Emits 'log' events on the process object which a log output listener can consume and print to the terminal.
This is used by various modules within the npm CLI stack in order to send
log events that npmlog
can consume and print.
API
log.error(...args)
callsprocess.emit('log', 'error', ...args)
The highest log level. For printing extremely serious errors that indicate something went wrong.log.warn(...args)
callsprocess.emit('log', 'warn', ...args)
A fairly high log level. Things that the user needs to be aware of, but which won't necessarily cause improper functioning of the system.log.notice(...args)
callsprocess.emit('log', 'notice', ...args)
Notices which are important, but not necessarily dangerous or a cause for excess concern.log.info(...args)
callsprocess.emit('log', 'info', ...args)
Informative messages that may benefit the user, but aren't particularly important.log.verbose(...args)
callsprocess.emit('log', 'verbose', ...args)
Noisy output that is more detail that most users will care about.log.silly(...args)
callsprocess.emit('log', 'silly', ...args)
Extremely noisy excessive logging messages that are typically only useful for debugging.log.http(...args)
callsprocess.emit('log', 'http', ...args)
Information about HTTP requests made and/or completed.log.pause(...args)
callsprocess.emit('log', 'pause')
Used to tell the consumer to stop printing messages.log.resume(...args)
callsprocess.emit('log', 'resume', ...args)
Used to tell the consumer that it is ok to print messages again.