{"_id":"strong-syslog","_rev":"198-19b89b1529a12d53192cd329caed596a","name":"strong-syslog","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"strong-syslog","version":"0.1.0","author":{"name":"Sam Roberts","email":"sam@strongloop.com"},"license":"MIT","_id":"strong-syslog@0.1.0","maintainers":[{"name":"octet","email":"sam@strongloop.com"}],"os":["!win32"],"dist":{"shasum":"63cdddc850ff6efb3a9d7897087f263833e5cc6d","tarball":"https://registry.npmjs.org/strong-syslog/-/strong-syslog-0.1.0.tgz","integrity":"sha512-sZ2BFtWg5nIm6LqIycca0TDHkt0GXhbLk0/tjmREbhW50B45PVmwPeyEmsZMJsFXAF58hjnXUSniWoPExWGzmQ==","signatures":[{"sig":"MEYCIQDxrL7QgAwu5+e7cwldD0aANY1quXOza2xGcvSQXKl7KQIhAOFj/66nPgEQ9snj4HR6BGSlOhOyoyjuhFmztbIBarGG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"63cdddc850ff6efb3a9d7897087f263833e5cc6d","gitHead":"24979cc925079707225af26287ce2b7196093fb4","gypfile":true,"scripts":{"test":"tap test/test-*.js","install":"node-gyp rebuild"},"_npmUser":{"name":"octet","email":"sam@strongloop.com"},"_npmVersion":"2.11.0","description":"modern syslog - streaming, async, uses nan","directories":{},"_nodeVersion":"2.2.1","dependencies":{"nan":"^1.6.2"},"devDependencies":{"tap":"^0.6.0","debug":"^2.1.2"}},"1.0.0":{"name":"strong-syslog","version":"1.0.0","author":{"name":"Sam Roberts","email":"sam@strongloop.com"},"license":"MIT","_id":"strong-syslog@1.0.0","maintainers":[{"name":"octet","email":"sam@strongloop.com"},{"name":"strongloop","email":"callback@strongloop.com"}],"os":["!win32"],"dist":{"shasum":"ad4da2f93d60f86586ccda9b40d731ee42702c20","tarball":"https://registry.npmjs.org/strong-syslog/-/strong-syslog-1.0.0.tgz","integrity":"sha512-cCCvA9+KyBNFdUyN8rSrZobaBLzhbhNMh7kj/bJfmdCIEbuBB6RObwcFhNIJ9CrYslRM6lFVBpRLlza9T++wXA==","signatures":[{"sig":"MEUCIQDpCXHwkA9/BVM21iodOJ/ygTxYNenJU9L07MeRZ3xLHAIgV03EM4aAwPwc266YLm+lKgevyGjOVNWhj+UjBjPSNac=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"ad4da2f93d60f86586ccda9b40d731ee42702c20","gitHead":"b9c83ff59d9d6a593a655ce20596d299b34a1e20","gypfile":true,"scripts":{"test":"tap test/test-*.js","install":"node-gyp rebuild"},"_npmUser":{"name":"octet","email":"sam@strongloop.com"},"_npmVersion":"2.13.2","description":"modern syslog - streaming, async, uses nan","directories":{},"_nodeVersion":"2.5.0","dependencies":{"nan":"^1.6.2"},"devDependencies":{"tap":"^1.3.2","debug":"^2.1.2"}}},"time":{"created":"2015-06-04T17:16:59.504Z","modified":"2026-04-14T15:16:24.328Z","0.1.0":"2015-06-04T17:16:59.504Z","1.0.0":"2015-08-20T20:10:08.259Z"},"author":{"name":"Sam Roberts","email":"sam@strongloop.com"},"license":"MIT","description":"modern syslog - streaming, async, uses nan","maintainers":[],"readme":"# modern syslog - streaming, async, native, uses nan\n\nThis is the only syslog library that:\n\n- Uses native bindings to the libc syslog API.\n- Is async, because the libc APIs can block on localhost IPC under load, but\n  that shouldn't block your app.\n- Can be used as a stream.\n- Has formatted log functions.\n- Uses nan, so supports node and io.js, and will continue to do so.\n- Is API compatible with [node-syslog][], from which I gathered inspiration\n  and owe thanks.\n\nDefault mask depends on system.\n\n## Installation\n\n    npm install --save modern-syslog\n\n## API\n\nFor detailed descriptions of the core functions, see [man 3\nsyslog](http://man7.org/linux/man-pages/man3/syslog.3.html).\n\nNote that syslog functions cannot fail, and neither throw errors, nor callback\nwith errors. This is consistent with the core functions, which do not have error\nreturn values.\n\n### log(priority, msg, callback)\n\n- `priority` {String|Number} OR of a level, and optionally, a facility.\n- `msg` {String|Buffer} Message to log.\n- `callback` {Function} Called after message is logged (no arguments).\n\n`priority` can be a String, in which case it will be looked up in\n`syslog.level`. It can also be a Number, in which case it is expected to be\na numeric value, such as `syslog.level.LOG_INFO`, optionally ORed with a\na numeric facility, such as `syslog.facility.LOG_LOCAL2`.\n\nSee below for formatted version of `log()`.\n\n### emerg(fmt, ...)\n### alert(fmt, ...)\n### crit(fmt, ...)\n### error(fmt, ...)\n### err(fmt, ...)\n### warn(fmt, ...)\n### warning(fmt, ...)\n### note(fmt, ...)\n### notice(fmt, ...)\n### info(fmt, ...)\n### debug(fmt, ...)\n\n- `fmt` {String} Arguments are formatted as `msg`, and passed to `log()`.\n\nConvenience functions, log level is pre-defined, facility uses default, either\nsystem default or that provided to `open()`, and message is formatted with\n`util.format()`.\n\n### new Stream(level, [facility])\n\n- `level` {String|Number} Level to log at.\n- `facility` {String|Number} Facility to log with, optional.\n\nReturns a writeable stream that logs all messages at the specified level and\nfacility.\n\n### open(ident, option, facility)\n\n- `ident` {String} Prepended to every message, usually program name.\n- `option` {Number} OR of flags from `syslog.options`.\n- `facility` {String|Number} Default facility to be used by `log()`.\n\nSet up defaults for log.\n\nCalling `open()` is optional, all arguments are provided with defaults, though\nthe defaults depend on the system (see man page).\n\n### close()\n\nClose the socket to the syslog system.\n\nCalling `close()` is optional, the socket is closed automatically by the\nsystem on exit.\n\n### upto(level)\n\n- `level` {String|Number} Level to log up to.\n\nLog all levels upto and including `level`.\n\n### setmask(mask)\n\n- `mask` {Number} OR of levels that should be logged.\n\nNot convenient to use but part of the low-level syslog API. See syslog man page\nfor details, and consider using `upto()` for most common use-cases.\n\n### curmask()\n\nReturns current log mask, see `setmask()`.\n\n### setMask(...)\n\nAvoid this, its for backwards compatibility with [node-syslog][].\n\n### init(...)\n\nAvoid this, its for backwards compatibility with [node-syslog][].\n\n## Properties\n\nSyslog properties are defined as a bi-directional map from String to Number, and\nfrom Number to String, so:\n\n- `syslog.level.LOG_DEBUG`: `7`, the numeric value of `LOG_DEBUG`\n- `syslog.level[7]`: `'LOG_DEBUG'`, string value of level `7`\n\n### syslog.level\n\nLevels are listed from highest priority, to lowest:\n\n- `LOG_EMERG`: System is unusable.\n- `LOG_ALERT`: Action must be taken immediately.\n- `LOG_CRIT`: Critical condition.\n- `LOG_ERR`: Error condition.\n- `LOG_WARNING`: Warning condition.\n- `LOG_NOTICE`: Normal, but significant, condition.\n- `LOG_INFO`: Informational message.\n- `LOG_DEBUG`: Debug-level message.\n\n### syslog.option\n\nObject of properties:\n\n- `LOG_CONS`: Log to console if there is error logging to syslog.\n- `LOG_PERROR`: Log to stderr as well as syslog.\n- `LOG_PID`: Log process' PID with each message.\n\nThese are unlikely to be useful, but are provided for completeness:\n\n- `LOG_NDELAY`: Open  the  connection  immediately (normally, the connection is\n  opened when the first message is logged).\n- `LOG_ODELAY`: The converse of `LOG_NDELAY`; opening of the connection is\n  delayed until the first message is logged (this is the default and need not be\n  specified).\n- `LOG_NOWAIT`: Archaic option that doesn't do anything on contemporary systems,\n  but is provided for backwards compatibility.\n\n### syslog.facility\n\n- `LOG_AUTH`\n- `LOG_AUTHPRIV` (not defined on all systems)\n- `LOG_CRON`\n- `LOG_DAEMON`\n- `LOG_FTP` (not defined on all systems)\n- `LOG_KERN`\n- `LOG_LOCAL0`\n- `LOG_LOCAL1`\n- `LOG_LOCAL2`\n- `LOG_LOCAL3`\n- `LOG_LOCAL4`\n- `LOG_LOCAL5`\n- `LOG_LOCAL6`\n- `LOG_LOCAL7`\n- `LOG_LPR`\n- `LOG_MAIL`\n- `LOG_NEWS`\n- `LOG_SYSLOG`\n- `LOG_USER`\n- `LOG_UUCP`\n\n[node-syslog]: https://www.npmjs.com/package/node-syslog\n","readmeFilename":"README.md"}