diff --git a/doc/api/events.md b/doc/api/events.md index eab0bef17e..6b19287881 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -278,6 +278,14 @@ emitter.once('event', () => { }); ``` +The [`--trace-warnings`][] command line flag can be used to display the +stack trace for such warnings. + +The emitted warning can be inspected with [`process.on('warning')`][] and will +have the additional `emitter`, `type` and `count` properties, referring to +the event emitter instance, the event’s name and the number of attached +listeners, respectively. + ### emitter.addListener(eventName, listener)