-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
logan fisher
authored and
logan fisher
committed
Sep 6, 2018
0 parents
commit a6d8d9f
Showing
10 changed files
with
11,646 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"sourceMaps": "inline", | ||
"plugins": [ | ||
"transform-es2015-modules-commonjs", | ||
"transform-strict-mode", | ||
"transform-es2015-destructuring", | ||
"transform-es2015-parameters", | ||
"transform-es2015-arrow-functions", | ||
[ | ||
"transform-object-rest-spread", | ||
{ | ||
"useBuiltIns": true | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "parkhub-base", | ||
"env": { | ||
"jest/globals": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## Yodelay | ||
|
||
Yodelay was made to combine the ability of logging and alerting to slack. The Winston logger adds a transport for uncaught exceptions so that we can notify slack with the error as it happens in the code. I also would like to extend the ability to alert for other cases possibly but for now this will do. | ||
|
||
### Example | ||
|
||
``` | ||
import Yodelay from "yodelay"; | ||
const logger = new Yodelay({ | ||
slackUrl: process.env.SLACK_URL, | ||
level: process.env.LOG_LEVEL, | ||
format: process.env.LOG_FORMAT, | ||
channel: "#exceptions" | ||
}).initialize(); | ||
logger.info('This is an info log...'); | ||
logger.error('This is an info log...'); | ||
logger.debug('This is an info log...'); | ||
``` | ||
|
||
| Param | Description | Type | Required | Options | Default | | ||
| -------- | --------------------- | ------ | -------- | ------------------------ | ------- | | ||
| slackUrl | Webhook url for Slack | String | true | | | | ||
| level | Log level | String | true | (inherited from winston) | info | | ||
| format | Log format | String | true | simple, json | simple | | ||
| channel | Slack channel | String | true | | | |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.