Skip to content

Commit 6a660e5

Browse files
alexk-blackopsalexk-blackops
authored andcommitted
read me and exception handler fixes
1 parent 04c6701 commit 6a660e5

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Start sending the logs:
2424
stackify.start(options);
2525
```
2626
The following options could be passed. 'apiKey' is the only one that required:
27-
* __apiKey:__ client license key.
28-
* __env:__ environment name.
29-
* __proxy:__ proxy server if you want to send requests via proxy.
30-
* __exitOnError:__ Boolean flag indicating whether to shutdown the server after logging an uncaughtException.
27+
* __apiKey:__ client license key
28+
* __env:__ environment name
29+
* __proxy:__ proxy server if you want to send requests via proxy
30+
* __exitOnError:__ Boolean flag indicating whether to shutdown the server after logging an uncaught exception
3131

3232
#### Using with Winston
3333

@@ -56,7 +56,7 @@ stackify.error(message, meta)
5656
```
5757
The timestamp will be added to every message by default.
5858

59-
Meta parameter should be a valid JSON object.
59+
Meta parameter should be an object.
6060

6161
Examples of usage:
6262
```js
@@ -76,7 +76,7 @@ By executing `stackify.start()` you set handler for uncaught exceptions.
7676
Be sure to run it before any methods that set exception handlers.
7777

7878
##### Using with pure NodeJS app
79-
If you are not using any of the frameworks and all requests are handled inside native `createServer()` method and you want to get web details of exception to be sent with it you should run `stackify.exceptionHandler(req)` first line inside of this method :
79+
If you want to get web details of an exception to be sent with it you should run `stackify.exceptionHandler(req)` first line inside of native `createServer` method :
8080

8181
```js
8282
var http = require('http');

lib/exception.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
var qs = require('querystring'),
22

33
error = require('./error'),
4-
logger = require('./logger');
5-
4+
logger = require('./logger'),
5+
CONFIG = require('../config/config');
6+
67
module.exports = {
78
// flag used to prevent catching the same exception twice (inside and outside of the createServer method)
89
excCaught : false,
@@ -52,7 +53,5 @@ module.exports = {
5253
this.excCaught = true;
5354
logger.methods.sendException(err, req, cb);
5455
}
55-
56-
};
5756
}
5857
};

0 commit comments

Comments
 (0)