{"dist":{"shasum":"9cf7b5a0c3e247756bc79786af2eeb600d24393e","tarball":"https://registry.npmjs.org/scribe/-/scribe-0.0.5.tgz","integrity":"sha512-QgUeTwed78GjbUximNMHEFrNGBDT/7wxB9gVEtGp1ZAjbVZaE/A8MGG8fsqhfWuAJahpC32Gq0pRA1teZovEIQ==","signatures":[{"sig":"MEUCIQDc1lzN2sojEy4PjERRwsEs36op/XLxKeWenskFZ37TvQIgEvLTubiP60rATsipnvBzkNfNDb/sDaYMrWrjAMYbfbk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"name":"scribe","author":{"name":"Applifier","email":"opensource@applifier.com"},"readme":"# node-scribe\nScribe client for node.js. Project also includes a drop-in replacement (Logger) for the default console object.\n## Installation\n    $ npm install scribe\n## Basic example\nExample of sending log entries to scribe server.\n\n    var Scribe = require('scribe').Scribe;\n\n    var scribe = new Scribe(\"localhost\", 1234, {autoReconnect:true});\n\n    scribe.open(function(err){\n\n      if(err) {\n        return console.log(err);\n      }\n\n      scribe.send(\"foocategory\", \"foomessage\");\n\n      scribe.close();\n\n    });\n\n## autoReconnect = true\nIf autoReconnect is set to true and connection fails, client will store log entries to queue and flush when connection has been re-established.\n\n## Logger\nLogger is an drop-in replacement for the default console object. Each log entry contains the level, hostname, pid, caller (file and position) and the log message given as parameter. Values are separated by tabulators.\n\n### Log levels\nLevels are defined by the function used or by hand when using the logMessage function.<br />\n    0 : EMERG <br />\n    1 : ALERT <br />\n    2 : CRITICAL (critical)<br />\n    3 : ERROR (error)<br />\n    4 : WARN (warn)<br />\n    5 : NOTICE<br />\n    6 : INFO (info)<br />\n    7 : DEBUG (debug, log)<br />\n\n### Example\nExample of using logger to replace node:s console object.\n\n    var Scribe = require('scribe').Scribe;\n    var Logger = require('scribe').Logger;\n\n    var scribe = new Scribe(\"localhost\", 1234, {autoReconnect:true});\n    var logger = new Logger(scribe, \"foobar\");\n    scribe.open(function(err){\n\n      if(err) {\n        return console.log(err);\n      }\n\n      logger.log(\"foomessage\");\n\n      logger.replaceConsole(); // replaces console with logger\n\n      console.log(\"foobar\");\n\n      logger.releaseConsole(); // reverts changes made by replaceConsole();\n\n      scribe.close();\n\n    });\n\n\n## License\n(The MIT License)\n\nCopyright(c) 2011 Applifier Ltd.<br />\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","engines":{"node":"*"},"_npmUser":{"name":"orktes","email":"jaakko@applifier.com"},"repository":{"url":"git://github.com/Applifier/node-scribe.git","type":"git"},"_npmVersion":"1.1.1","description":"Scribe client","maintainers":[{"name":"orktes","email":"jaakko@applifier.com"}],"_nodeVersion":"v0.6.0","dependencies":{"thrift":"0.7.0"},"_defaultsLoaded":true,"devDependencies":{},"_engineSupported":true,"optionalDependencies":{},"_id":"scribe@0.0.5","version":"0.0.5"}