Comparing version 0.2.8 to 0.2.9
@@ -23,2 +23,3 @@ var HTTP_STATUS_CODES = require('http').STATUS_CODES; | ||
this.timeout = 30 * 1000; | ||
this.developmentEnvironments = []; | ||
@@ -65,2 +66,9 @@ this.protocol = 'http'; | ||
Airbrake.prototype.notify = function(err, cb) { | ||
var callback = this._callback(cb); | ||
// log errors instead of posting to airbrake if a dev enviroment | ||
if (this.developmentEnvironments.indexOf(this.env) != -1) { | ||
this.log(err); | ||
return callback(); | ||
} | ||
var body = this.notifyXml(err); | ||
@@ -79,4 +87,2 @@ | ||
var callback = this._callback(cb); | ||
request(options, function(err, res, body) { | ||
@@ -83,0 +89,0 @@ if (err) { |
@@ -5,3 +5,3 @@ { | ||
"description": "Node.js client for airbrakeapp.com, formerly known as hoptoadapp.com.", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"homepage": "https://github.com/felixge/node-airbrake", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -180,2 +180,6 @@ # airbrake | ||
### airbrake.developmentEnvironments = [] | ||
Do not post to Airbrake when running in these environments. | ||
### airbrake.timeout = 30 * 1000 | ||
@@ -182,0 +186,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86929
20
576
237
19