Dump node context into a file on process crash, send it by mail
[sudo] npm install crashreporter
require('crashreporter');
require('crashreporter').configure({
outDir: [your out directory], // default to cwd
exitOnCrash: [true|false] // if you want that crash reporter exit(1) for you, default to true,
maxCrashFile: [number] // older files will be removed up, default 5 files are kept
});
See http://www.nodemailer.com/ for support
require('crashreporter').configure({
mailEnabled: true,
mailTransportName: 'SMTP',
mailTransportConfig: {
service: 'Gmail',
auth: {
user: "[email protected]",
pass: "yourpass"
}
},
mailSubject: 'advanced.js crashreporter test',
mailFrom: 'crashreporter <[email protected]>',
mailTo: '[email protected]'
});
Hidden Attributes
Hidden Attribute hide items in the email.
require('crashreporter').configure({
...
hiddenAttributes: ['versions', 'error'],
...
});
- dateTime
- execPath
- argv
- currentDirectory
- env
- currentDirectory
- env
- pid
- gid
- uid
- processTitle
- uptime
- arch
- versions
- memoryUsage
- requireCache
- activeHandle
- activeRequest
- stack
crash_YYYY-MM-DD_HH-mm-ss_zzz_UTC.txt
Date time:
-----------------------
execPath:
-----------------------
argv:
-----------------------
current directory:
-----------------------
env:
-----------------------
gid:
-----------------------
uid:
-----------------------
pid:
-----------------------
process title:
-----------------------
uptime (sec):
-----------------------
arch: x
-----------------------
versions:
-----------------------
memory usage:
-----------------------
require.cache:
-----------------------
active handle:
-----------------------
active request:
-----------------------
stack