1- # nodereport
1+ # node-report
22
33Delivers a human-readable diagnostic summary, written to file.
44
@@ -14,18 +14,18 @@ Supports Node.js v4, v6 and v7 on Linux, MacOS, Windows and AIX.
1414## Usage
1515
1616``` bash
17- npm install nodereport
18- node -r nodereport app.js
17+ npm install node-report
18+ node -r node-report app.js
1919```
20- A NodeReport will be triggered automatically on unhandled exceptions and fatal
20+ A report will be triggered automatically on unhandled exceptions and fatal
2121error events (for example out of memory errors), and can also be triggered
2222by sending a USR2 signal to a Node.js process (AIX/Linux/MacOS only).
2323
24- A NodeReport can also be triggered via an API call from a JavaScript
24+ A report can also be triggered via an API call from a JavaScript
2525application.
2626
2727``` js
28- var nodereport = require (' nodereport ' );
28+ var nodereport = require (' node-report ' );
2929nodereport .triggerReport ();
3030```
3131The content of a NodeReport can also be returned as a JavaScript string via an
@@ -40,27 +40,27 @@ The API can be used without adding the automatic exception and fatal error
4040hooks and the signal handler, as follows:
4141
4242``` js
43- var nodereport = require (' nodereport /api' );
43+ var nodereport = require (' node-report /api' );
4444nodereport .triggerReport ();
4545```
4646
47- Content of the NodeReport consists of a header section containing the event
47+ Content of the report consists of a header section containing the event
4848type, date, time, PID and Node version, sections containing JavaScript and
4949native stack traces, a section containing V8 heap information, a section
5050containing libuv handle information and an OS platform information section
51- showing CPU and memory usage and system limits. An example NodeReport can be
51+ showing CPU and memory usage and system limits. An example report can be
5252triggered using the Node.js REPL:
5353
5454```
5555$ node
56- > nodereport = require('nodereport ')
56+ > nodereport = require('node-report ')
5757> nodereport.triggerReport()
58- Writing Node.js report to file: NodeReport .20161020.091102.8480.001.txt
58+ Writing Node.js report to file: node-report .20161020.091102.8480.001.txt
5959Node.js report completed
6060>
6161```
6262
63- When a NodeReport is triggered, start and end messages are issued to stderr
63+ When a report is triggered, start and end messages are issued to stderr
6464and the filename of the report is returned to the caller. The default filename
6565includes the date, time, PID and a sequence number. Alternatively, a filename
6666can be specified as a parameter on the ` triggerReport() ` call.
@@ -74,14 +74,15 @@ nodereport.triggerReport("myReportName");
7474Additional configuration is available using the following APIs:
7575
7676``` js
77+ var nodereport = require (' node-report/api' );
7778nodereport .setEvents (" exception+fatalerror+signal+apicall" );
7879nodereport .setSignal (" SIGUSR2|SIGQUIT" );
7980nodereport .setFileName (" stdout|stderr|<filename>" );
8081nodereport .setDirectory (" <full path>" );
8182nodereport .setVerbose (" yes|no" );
8283```
8384
84- Configuration on module Initialization is also available via environment variables:
85+ Configuration on module initialization is also available via environment variables:
8586
8687``` bash
8788export NODEREPORT_EVENTS=exception+fatalerror+signal+apicall
@@ -93,14 +94,14 @@ export NODEREPORT_VERBOSE=yes|no
9394
9495## Examples
9596
96- To see examples of NodeReports generated from these events you can run the
97- demonstration applications provided in the nodereport github repository. These are
97+ To see examples of reports generated from these events you can run the
98+ demonstration applications provided in the node-report github repository. These are
9899Node.js applications which will prompt you to trigger the required event.
99100
100- 1 . ` api.js ` - NodeReport triggered by JavaScript API call.
101- 2 . ` exception.js ` - NodeReport triggered by unhandled exception.
102- 3 . ` fatalerror.js ` - NodeReport triggered by fatal error on JavaScript heap out of memory.
103- 4 . ` loop.js ` - looping application, NodeReport triggered using kill ` -USR2 <pid> ` .
101+ 1 . ` api.js ` - report triggered by JavaScript API call.
102+ 2 . ` exception.js ` - report triggered by unhandled exception.
103+ 3 . ` fatalerror.js ` - report triggered by fatal error on JavaScript heap out of memory.
104+ 4 . ` loop.js ` - looping application, report triggered using kill ` -USR2 <pid> ` .
104105
105106## License
106107
0 commit comments