Skip to content

Commit 7787a12

Browse files
committed
Merge pull request #9 from alexk-blackops/master
package.json fix : remove readme field
2 parents 20b0d6c + d5012a0 commit 7787a12

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stackify-logger",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Stackify logs and errors for Node.Js",
55
"main": "index.js",
66
"scripts": {
@@ -25,8 +25,6 @@
2525
"stack-trace": "0.0.9",
2626
"sync-request": "^1.0.1"
2727
},
28-
"readme": "#Stackify Log API for Node.js\n\nErrors and Logs Overview:\n\nhttp://docs.stackify.com/m/7787/l/189767\n\nSign Up for a Trial:\n\nhttp://www.stackify.com/sign-up/\n\n## Installation\n```bash\n$ npm install stackify-logger\n```\n\n## Usage\n\n```js\nvar stackify = require(‘stackify-logger’);\n```\nStart sending logs:\n```js\n// this should be executed only once in the app\nstackify.start(options);\n```\nThe following options could be passed. 'apiKey' is the only one that required:\n* __apiKey:__ client license key\n* __env:__ environment name\n* __exitOnError:__ boolean flag indicating whether to shutdown the server after logging an uncaught exception, defaults to false\n* __proxy:__ proxy server if you want to send requests via proxy.\n\n*Notice:* stackify-logger sends synchronous requests if you call `process.exit()`. Sending via proxy wouldn't be possible in this case.\n\n#### Using direct logger\n\nIf you are not using Winston logger you can use default Stackify logger. It has 5 levels of messages: `trace`, `debug`, `info`, `warn` and `error`. To send the message to Stackify API you should run one of the following methods in any place of your code where you want to track some information:\n```js\nstackify.log(level, message [, meta])\nstackify.trace(message [, meta])\nstackify.debug(message [, meta])\nstackify.info(message [, meta])\nstackify.warn(message [, meta])\nstackify.error(message [, meta])\n```\n\n**Message** must be a string.\n\n**meta** - an additional parameter of any type.\n\nExamples of usage:\n```js\n// Add the module to all the script files where you want to log any messages.\nvar stackify = require('stackify-logger');\n\nstackify.log('info', 'hey!');\nstackify.debug('any message');\nstackify.info('any message', {anything: 'this is metadata'});\nstackify.warn('attention');\nstackify.log('error', {error : new Error()});\n```\nWhen logging an error message you can pass an Error object in metadata like in the last example, so the exception details would be available.\n\n#### Exception handling\nBy executing `stackify.start()` you set a handler for uncaught exceptions.\nMake sure you run it before any methods that set exception handlers.\n\n##### Using with Express\nGlobal handler doesn't work inside Express route methods.\nYou should use error-handling middleware function `stackify.expressExceptionHandler`. Since middleware is executed serially, it's order of inclusion is important. Make sure you add it before any other error-handling middleware.\n\n```js\nvar express = require('express');\nvar app = express();\n\n/* \n*** block of route handlers ***\n*** *** **** **** **** **** ***\n*/\n\napp.use(stackify.expressExceptionHandler);\n```\n\nTo handle exceptions correctly put this right after all route handlers.\n\n## Troubleshooting\nWhen request to Stackify fails for some reason, an error message is being printed to your `process.stderr` stream \n\n## License\n\nCopyright 2014 Stackify, LLC.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
29-
"readmeFilename": "README.md",
3028
"gitHead": "d0b7a4ade02acf6dc17d5c1e96d67a78edc9ed7f",
3129
"bugs": {
3230
"url": "https://github.com/stackify/stackify-log-nodejs/issues"

0 commit comments

Comments
 (0)