# event-debug **Repository Path**: mirrors_watson/event-debug ## Basic Information - **Project Name**: event-debug - **Description**: Log all events emitted by a Node.js EventEmitter object - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-26 - **Last Updated**: 2026-04-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # event-debug Log all events emitted by a Node.js EventEmitter object. [![npm](https://img.shields.io/npm/v/event-debug.svg)](https://www.npmjs.com/package/event-debug) [![Build status](https://travis-ci.org/watson/event-debug.svg?branch=master)](https://travis-ci.org/watson/event-debug) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) ## Installation ``` npm install event-debug ``` ## Usage Example HTTP server where we log all event emitted by the server: ```js var http = require('http') var eventDebug = require('event-debug') var server = http.createServer(function (req, res) { console.log('-- Received request') eventDebug(req) // 1st argument should behave like an EventEmitter eventDebug(res) res.end('Hello World') }) eventDebug(server, 'MyServer') // use custom logging prefix 'MyServer' server.listen(3000, function () { console.log('-- Server is running on port 3000') }) ``` When running this server and sending an HTTP request to it, the following output will be produced (the lines written by event-debug are all written to STDERR): screen shot 2017-03-27 at 23 36 03 ## License [MIT](LICENSE)