0.0.4 • Published 9 years ago

node-crashreporter v0.0.4

Weekly downloads
18
License
-
Repository
-
Last release
9 years ago

node-crashreporter

Dump node context into a file on process crash, send it by mail

Based on crashreporter, update its mail sender module

Installing crashreporter

[sudo] npm install [-g] node-crashreporter

Usage

Basic

require('node-crashreporter');                               
		

More

require('node-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
});
		

Advanced: send mail

See http://www.nodemailer.com/ for support

require('node-crashreporter').configure({
  mailEnabled: true,
  mailTransportName: 'SMTP',
  mailTransportConfig: {
    host: 'smtp.163.com',
    port: 994,
    secure: true,
    auth: {
      user: 'foo@163.com',
      pass: 'your password'
    }
  },
  mailSubject: 'foo crashreporter',
  mailFrom: 'crashreporter <foo@163.com>',
  mailTo: 'xxx@qq.com'
});
		

File

Name

crash_YYYY-MM-DD_HH-mm-ss_zzz_UTC.txt

Dump

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