{"_id":"bristol","_rev":"27-e2af90a2ab130a3817e7a26195ae689d","name":"bristol","description":"Insanely configurable logging for Node.js","dist-tags":{"latest":"0.4.0"},"versions":{"0.2.0":{"name":"bristol","version":"0.2.0","description":"Insanely configurable logging for Node.js","main":"lib/Bristol.js","scripts":{"test":"echo Node `node -v`; echo NPM `npm -v`; echo Mocha `mocha --version`; grunt test"},"homepage":"https://github.com/TomFrost/Bristol","repository":{"type":"git","url":"git://github.com/TomFrost/Bristol.git"},"config":{"blanket":{"pattern":"lib","data-cover-never":"[node_modules, /test]"},"travis-cov":{"threshold":80}},"keywords":["log","datatype","commoninfomodel","json"],"author":{"name":"Tom Frost","email":"tom@frosteddesign.com"},"license":"MIT","devDependencies":{"should":"~3.2.0","mocha":"~1.18.2","tmp":"0.0.23","grunt":"~0.4.2","grunt-contrib-jshint":"~0.8.0","blanket":"~1.1.5","grunt-mocha-test":"~0.8.2","grunt-env":"~0.4.1","travis-cov":"~0.2.4"},"dependencies":{"moment":"~2.5.1"},"bugs":{"url":"https://github.com/TomFrost/Bristol/issues"},"_id":"bristol@0.2.0","dist":{"shasum":"1c6bd16a36eb183cba1e12bd5cbf704e951ac4a1","tarball":"https://registry.npmjs.org/bristol/-/bristol-0.2.0.tgz","integrity":"sha512-Z8LALTITEFy5Bw83a3NnxKwQNrQ64VncrhVHmqeqGkSz3b//N5zlNfycOdHr4Bk7gLVPZPRJHyAXFAWoc5QwCQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+SMfLCaiQ202sP87Iz+i+7fh+uRC687o6A+aeveenxgIgPVxRXPPmXncCr8c3elzp2XGDGdkGsR0vMMymXWrx5vg="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"tomfrost","email":"tom@frosteddesign.com"},"maintainers":[{"name":"tomfrost","email":"tom@frosteddesign.com"}],"directories":{}},"0.2.1":{"name":"bristol","version":"0.2.1","description":"Insanely configurable logging for Node.js","main":"lib/Bristol.js","scripts":{"test":"echo Node `node -v`; echo NPM `npm -v`; echo Mocha `mocha --version`; grunt test"},"homepage":"https://github.com/TomFrost/Bristol","repository":{"type":"git","url":"git://github.com/TomFrost/Bristol.git"},"config":{"blanket":{"pattern":"lib","data-cover-never":"[node_modules, /test]"},"travis-cov":{"threshold":80}},"keywords":["log","datatype","commoninfomodel","json"],"author":{"name":"Tom Frost","email":"tom@frosteddesign.com"},"license":"MIT","devDependencies":{"should":"~3.2.0","mocha":"~1.18.2","tmp":"0.0.23","grunt":"~0.4.2","grunt-contrib-jshint":"~0.8.0","blanket":"~1.1.5","grunt-mocha-test":"~0.8.2","grunt-env":"~0.4.1","travis-cov":"~0.2.4"},"dependencies":{"moment":"~2.5.1"},"bugs":{"url":"https://github.com/TomFrost/Bristol/issues"},"_id":"bristol@0.2.1","dist":{"shasum":"1e1fa5d7391fd24ef21c6d64b83eabe50837e7ae","tarball":"https://registry.npmjs.org/bristol/-/bristol-0.2.1.tgz","integrity":"sha512-z2TOQ/i+LDKyTHm5QHZfN/y/u8Ff7Nz7a5zgND1eqRa8YKD1zMysEg4q1fXODbmk9Rsju53RYj/zPI8M7eXE/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3SiI+XIa3kltdFLJd9E67HFdD+iJcFVo10E77suDXPAIgZV1kPwnV8QCFF92uDX26vrTIeoOBFEYtrgP22woK9io="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"tomfrost","email":"tom@frosteddesign.com"},"maintainers":[{"name":"tomfrost","email":"tom@frosteddesign.com"}],"directories":{}},"0.2.2":{"name":"bristol","version":"0.2.2","description":"Insanely configurable logging for Node.js","main":"lib/Bristol.js","scripts":{"test":"echo Node `node -v`; echo NPM `npm -v`; echo Mocha `mocha --version`; grunt test"},"homepage":"https://github.com/TomFrost/Bristol","repository":{"type":"git","url":"git://github.com/TomFrost/Bristol.git"},"config":{"blanket":{"pattern":"lib","data-cover-never":"[node_modules, /test]"},"travis-cov":{"threshold":80}},"keywords":["log","datatype","commoninfomodel","json"],"author":{"name":"Tom Frost","email":"tom@frosteddesign.com"},"license":"MIT","devDependencies":{"should":"~3.2.0","mocha":"~1.18.2","tmp":"0.0.23","grunt":"~0.4.2","grunt-contrib-jshint":"~0.8.0","blanket":"~1.1.5","grunt-mocha-test":"~0.8.2","grunt-env":"~0.4.1","travis-cov":"~0.2.4"},"dependencies":{"moment":"~2.5.1"},"bugs":{"url":"https://github.com/TomFrost/Bristol/issues"},"_id":"bristol@0.2.2","dist":{"shasum":"e47dc5c2d8ee570ff2dbd88aba828abfd9c26cd5","tarball":"https://registry.npmjs.org/bristol/-/bristol-0.2.2.tgz","integrity":"sha512-9SMZwvE/WjSh4iXpwciMAozjKvKQfEbHXfxt1gXOitW/cJ0n0mnCQ3185X7O/mG6+vUrMuDVv8o0tCYoDKgPEw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE254OTu9RSj+xco8tXUD4Umm8wFJuu1GLHBAVoX/1vhAiBpqDJcHo3gnaPzJBkNSkqbnkwK7aLTkO++AL+eFAe+3g=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"tomfrost","email":"tom@frosteddesign.com"},"maintainers":[{"name":"tomfrost","email":"tom@frosteddesign.com"}],"directories":{}},"0.3.0":{"name":"bristol","version":"0.3.0","description":"Insanely configurable logging for Node.js","main":"lib/Bristol.js","scripts":{"test":"echo Node `node -v`; echo NPM `npm -v`; echo Mocha `mocha --version`; grunt test"},"homepage":"https://github.com/TomFrost/Bristol","repository":{"type":"git","url":"git://github.com/TomFrost/Bristol.git"},"config":{"blanket":{"pattern":"lib","data-cover-never":"[node_modules, /test]"},"travis-cov":{"threshold":80}},"keywords":["log","datatype","commoninfomodel","json"],"author":{"name":"Tom Frost","email":"tom@frosteddesign.com"},"license":"MIT","devDependencies":{"should":"~3.2.0","mocha":"~1.18.2","tmp":"0.0.23","grunt":"~0.4.2","grunt-contrib-jshint":"~0.8.0","blanket":"~1.1.5","grunt-mocha-test":"~0.8.2","grunt-env":"~0.4.1","travis-cov":"~0.2.4","loggly":"^1.0.4"},"dependencies":{"moment":"~2.5.1"},"bugs":{"url":"https://github.com/TomFrost/Bristol/issues"},"_id":"bristol@0.3.0","_shasum":"7300d974ae13378fe6873b249bbc203ee59265ca","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"tomfrost","email":"tom@frosteddesign.com"},"maintainers":[{"name":"tomfrost","email":"tom@frosteddesign.com"}],"dist":{"shasum":"7300d974ae13378fe6873b249bbc203ee59265ca","tarball":"https://registry.npmjs.org/bristol/-/bristol-0.3.0.tgz","integrity":"sha512-gV57rc7MfpHfv4HQUsoRDTkJbKCPzraev5A6PQxKy8Z0jSK5IZgFJMLte1qAOtwr4Udiy7cEWYHOmYnQxS2WPA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICr9LGiyBFbsAA/X7ZhwPKccRIRtczSVPdKxQEjKssAGAiAgmpnT3K6GGX0v241uFH2lT0QusG28DOZvvKUM3K93tQ=="}]},"directories":{}},"0.3.1":{"name":"bristol","version":"0.3.1","description":"Insanely configurable logging for Node.js","main":"lib/Bristol.js","scripts":{"test":"echo Node `node -v`; echo NPM `npm -v`; echo Mocha `mocha --version`; grunt test"},"homepage":"https://github.com/TomFrost/Bristol","repository":{"type":"git","url":"git://github.com/TomFrost/Bristol.git"},"config":{"blanket":{"pattern":"lib","data-cover-never":"[node_modules, /test]"},"travis-cov":{"threshold":80}},"keywords":["log","datatype","commoninfomodel","json"],"author":{"name":"Tom Frost","email":"tom@frosteddesign.com"},"license":"MIT","devDependencies":{"should":"~3.2.0","mocha":"~1.18.2","tmp":"0.0.23","grunt":"~0.4.2","grunt-contrib-jshint":"~0.8.0","blanket":"~1.1.5","grunt-mocha-test":"~0.8.2","grunt-env":"~0.4.1","travis-cov":"~0.2.4","loggly":"^1.0.4"},"dependencies":{"moment":"~2.5.1"},"bugs":{"url":"https://github.com/TomFrost/Bristol/issues"},"_id":"bristol@0.3.1","_shasum":"b6f298e4da7c8a2386fc5316f44ef8861289f2b4","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"tomfrost","email":"tom@frosteddesign.com"},"maintainers":[{"name":"tomfrost","email":"tom@frosteddesign.com"}],"dist":{"shasum":"b6f298e4da7c8a2386fc5316f44ef8861289f2b4","tarball":"https://registry.npmjs.org/bristol/-/bristol-0.3.1.tgz","integrity":"sha512-Z83oMHmo/vzELIj/+8wGXobSPiOLc5kQmJjnjuWn8PVmZDUi79EBBu9mWDN3epyZHldAJEBrp3BY0/FwYS4f5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGfjXStzUfp+Y3krLsNbnb7dsRU1oFLuMBO92brTxupgIgb04TAhBmhsi5PZ9hHwMCngmF4zu3f+v1bTtlOMT/vrI="}]},"directories":{}},"0.3.2":{"name":"bristol","version":"0.3.2","description":"Insanely configurable logging for Node.js","main":"lib/Bristol.js","scripts":{"test":"echo Node `node -v`; echo NPM `npm -v`; echo Mocha `mocha --version`; grunt test"},"homepage":"https://github.com/TomFrost/Bristol","repository":{"type":"git","url":"git://github.com/TomFrost/Bristol.git"},"config":{"blanket":{"pattern":"lib","data-cover-never":"[node_modules, /test]"},"travis-cov":{"threshold":80}},"keywords":["log","datatype","commoninfomodel","json"],"author":{"name":"Tom Frost","email":"tom@frosteddesign.com"},"license":"MIT","devDependencies":{"should":"~3.2.0","mocha":"~1.18.2","tmp":"0.0.23","grunt":"~0.4.2","grunt-contrib-jshint":"~0.8.0","blanket":"~1.1.5","grunt-mocha-test":"~0.8.2","grunt-env":"~0.4.1","travis-cov":"~0.2.4","loggly":"^1.0.4"},"dependencies":{"moment":"~2.5.1"},"bugs":{"url":"https://github.com/TomFrost/Bristol/issues"},"_id":"bristol@0.3.2","_shasum":"a0d53850bed2ceff846ea182b560d361da26b0e4","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"tomfrost","email":"tom@frosteddesign.com"},"maintainers":[{"name":"tomfrost","email":"tom@frosteddesign.com"}],"dist":{"shasum":"a0d53850bed2ceff846ea182b560d361da26b0e4","tarball":"https://registry.npmjs.org/bristol/-/bristol-0.3.2.tgz","integrity":"sha512-ewyW5WpBwGNYuO8dakcxofAyCQyceewnuaK7tyPWyQgRK9KVK+4QdCBlWHXEmN+HI13iD+yXSKogAQuUB+s9BA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2DbT9Yb46kFgq6pt/8qcrqm8PSxUBsiFdo+Xq0DB3OAiEA1J/nFoVDaYsvV5mlDoavCCgd7W6rexWNZ7SKw35Y5YU="}]},"directories":{}},"0.3.3":{"name":"bristol","version":"0.3.3","description":"Insanely configurable logging for Node.js","main":"lib/Bristol.js","scripts":{"test":"npm run test-cov && npm run check-cov","mocha":"mocha --recursive test","test-cov":"istanbul cover _mocha -- --recursive test","check-cov":"istanbul check-coverage --statements 90 --functions 90 --branches 70 --lines 90"},"homepage":"https://github.com/TomFrost/Bristol","repository":{"type":"git","url":"git://github.com/TomFrost/Bristol.git"},"config":{"blanket":{"pattern":"lib","data-cover-never":"[node_modules, /test]"},"travis-cov":{"threshold":80}},"keywords":["log","datatype","commoninfomodel","json"],"author":{"name":"Tom Frost","email":"tom@frosteddesign.com"},"license":"MIT","devDependencies":{"istanbul":"^0.3.21","loggly":"^1.0.8","mocha":"^2.3.3","should":"^7.1.0","tmp":"0.0.28"},"dependencies":{"moment":"~2.5.1"},"gitHead":"8c19f2885707901bb867e0b12bb924c98ade822a","bugs":{"url":"https://github.com/TomFrost/Bristol/issues"},"_id":"bristol@0.3.3","_shasum":"c9ac556571cd458d382a7eee2bd7c8cd2af945be","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.4","_npmUser":{"name":"tomfrost","email":"tom@frosteddesign.com"},"dist":{"shasum":"c9ac556571cd458d382a7eee2bd7c8cd2af945be","tarball":"https://registry.npmjs.org/bristol/-/bristol-0.3.3.tgz","integrity":"sha512-+4w35EJfrA+Ol6kFCikgGqBBXIQj2f/qrB5Ynoc5+t9g3bDiHTHy+XOBLZdzxI3JEwOlBPirYJUigtMkCFl7Zg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDH7L/3Pe2f8YMVvZZ8H4DBLRIAHFKhy1tnhZMGeLtbHgIhAICr40WOQ9VrleKDbrxxCy1bRNVMbfCwSXd6srHbK9Ef"}]},"maintainers":[{"name":"tomfrost","email":"tom@frosteddesign.com"}],"directories":{}},"0.4.0":{"name":"bristol","version":"0.4.0","description":"Insanely configurable logging for Node.js","main":"src/Bristol.js","scripts":{"lint":"eslint src test","test":"npm run lint && npm run test-cov && npm run check-cov","mocha":"mocha","test-cov":"istanbul cover _mocha","check-cov":"istanbul check-coverage --statements 90 --functions 90 --branches 70 --lines 90"},"homepage":"https://github.com/TomFrost/Bristol","repository":{"type":"git","url":"git://github.com/TomFrost/Bristol.git"},"keywords":["log","datatype","commoninfomodel","json"],"author":{"name":"Tom Shawver","email":"tom@frosteddesign.com"},"license":"MIT","devDependencies":{"chai":"^4.1.2","chai-as-promised":"^7.1.1","eslint":"^4.19.0","istanbul":"^0.4.5","loggly":"^1.1.1","mocha":"^5.0.4","sinon":"^4.4.6","sinon-chai":"^3.0.0","tmp":"0.0.31"},"dependencies":{"json-stringify-safe":"^5.0.1","moment":"^2.21.0"},"gitHead":"19f3e032a36493487ec8f40f8be778df2d122d9d","bugs":{"url":"https://github.com/TomFrost/Bristol/issues"},"_id":"bristol@0.4.0","_npmVersion":"5.7.1","_nodeVersion":"9.5.0","_npmUser":{"name":"tomfrost","email":"tom@frosteddesign.com"},"dist":{"integrity":"sha512-l7yaBNMFRehoxqoWg36J5WbPJiEYzc05WS64Oba2rIddUuKMAwl6yyXx08L5NGY3+ZnrmM0SXOtzL9JffQ7mfg==","shasum":"a696201fb72ba5c8f0d26e0ee933a7d740383666","tarball":"https://registry.npmjs.org/bristol/-/bristol-0.4.0.tgz","fileCount":27,"unpackedSize":85932,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCUZ35jUjbvqwci8ROhdfXYZ03dy38EltXphfvrMHGCwIhAP0WXvWIY4wrPmnRyo2QebY3EMKz+h3t7HA8mGKCbM59"}]},"maintainers":[{"name":"tomfrost","email":"tom@frosteddesign.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bristol_0.4.0_1521428644227_0.49105226387549084"},"_hasShrinkwrap":false}},"readme":"# Bristol [![Build Status](https://travis-ci.org/TomFrost/Bristol.svg?branch=master)](https://travis-ci.org/TomFrost/Bristol)\nInsanely configurable logging for Node.js\n\n## Why another logger?\nNPM has no shortage of loggers.  Bristol was created to address a few common\nshortcomings in the current pool of options:\n- The message format should be decoupled from the message target (file,\nconsole, etc). You never know what system will be ingesting log files.\n- Structured logging should be the norm, _and simple log functions should\nmake that easy!_ No more shortcuts to `util.format`; if you're injecting\nvalues into a string, chances are they should be logged under their own\nkeys.\n- No restrictions on data type.  If you log an Error object, your logger\nshould know what to do with that.  Same goes for a string, an object, a\ndate, as well as application-specific data types.\n- Lightweight! Why load modules that your configuration never uses? Bristol\nlazy-loads everything it can.\n- No callbacks, return values, or anything that would disincentivize a\ndeveloper from throwing in a quick log message.\n\nThose points and more drove the development of a brand new breed of logging\nlibrary.  Introducing Bristol.\n\n## Installation\nIn your project folder, type:\n\n\tnpm install bristol --save\n\n## Usage\n### Quick start\n\n```js\nvar log = require('bristol');\nlog.addTarget('console');\n\nlog.info(\"We're up and running!\", {port: 3000});\n```\n\nOutputs (pretty-printed for README only):\n\n```js\n{\n\t\"message\": \"We're up and running!\",\n\t\"date\": \"2014-04-09 00:45:37\",\n\t\"severity\": \"info\",\n\t\"file\": \"/path/to/my/file.js\",\n\t\"line\": \"4\",\n\t\"port\": 3000\n}\n```\n\nBristol can now be require()'d in any other file, and the settings will follow\nit.\n\n### Customizing the output\n\n```js\n\tlog.addTarget('console')\n\t\t.withFormatter('human');\n\n\tlog.debug(\"Hello, world\", {event: 'bootstrap:welcome'});\n```\n\nOutputs:\n\n```\n[2014-04-09 00:53:59] DEBUG: Hello, world (/path/to/my/file.js:5)\n\tevent: bootstrap:welcome\n```\n\n### Available formatters\n- **human:** Multi-line messages suitable for humans during development\n- **json:** One line per message, valid json\n- **syslog:** Syslog-compliant format, single-line\n- **commonInfoModel:** Common Info Model format, friendly to many log\n\taggregators. More human-readable than JSON with similar benefits. One\n\tline per message.\n\n### Available targets\n#### console\nOutputs directly to stdout using console.log() to ensure writes are blocking\nand synchronous. This is _excellent_ for debugging, but is not recommended in\nproduction as this is not performant.  There are no options for this target.\n\n#### file\nStreams output to a file using a logrotate-friendly WriteStream.  Required\noptions:\n- **file** *string:* The full path to the file to be created or opened\n\n#### loggly\nPushes new messages directly to the Loggly API.  Note that, to keep Bristol\nlight, the Loggly API library is not included as a core dependency.  You must\nrun `npm install loggly --save` in your project root in order to use this\ntarget.\n\nRequired options:\n- **token** *string:* Your loggly token\n- **subdomain** *string:* Your registered Loggly subdomain\n- **username** *string:* Loggly username\n- **password** *string:* Loggly password\n\nOptional:\n- **tags** *Array|string:* Global Loggly tags\n\n### Severity levels\nBy default, Bristol provides *error*, *warn*, *info*, *debug*, and *trace*\nseverity levels.  These can be called as function names from the log object,\nor passed to the `log` function as the first parameter.\n\nTo change these levels to something else:\n\n```js\n// List in order from MOST to LEAST severe:\nlog.setSeverities(['panic', 'omg', 'uhoh', 'crap', 'ok']);\n\n// Functions matching the provided severities now exist\nlog.panic(\"WHAT ARE WE GOING TO DO?!\");\nlog.log('omg', new Error(\"Something failed.\"));\n\n// The old ones do not.\nlog.debug(\"This will throw an exception now\");\nlog.log('trace', \"So will this.\");\n```\n\n### Transforming your data types\nBristol allows you to send near-infinite arguments to the logging functions,\nand attempts to intelligently turn those into useful log messages.  If your\napplication has its own data structures, it can be useful to inform Bristol\nof them so that only pertinent values are logged if one of those is passed to\na logging function.\n\n```js\nlog.addTransform(function(elem) {\n\t// This function should return data that should be logged instead of\n\t// the raw 'elem', or NULL if 'elem' isn't a type that we care about.\n\tif (elem.userName && elem.userId) {\n\t\t// elem is our enormous proprietary user object!\n\t\treturn {\n\t\t\tusername: elem.userName,\n\t\t\tconnected: elem.lastSuccessfulConnection,\n\t\t\tping: elem.getLastPingTime()\n\t\t};\n\t}\n\treturn null;\n});\n\n// Now our \"incomingConn\" user object will just add its 3 most important\n// properties to the resulting log message, rather than all of them.\nlog.info(\"New connection\", incomingConn, {connections: server.getUserCount()});\n```\n\n### Setting global log values\nDo you need certain pieces of information logged with every message?\n\n```js\nlog.setGlobal('hostname', require('os').hostname());\nlog.setGlobal('msg_uuid', function() {\n    return uuid.v4();\n});\n\nlog.info(\"This message contains both of those key/value pairs!\");\n```\n\nFunctions provided to `setGlobal` will be executed for every log message.\nNote that they're only called once per message even if multiple\ntargets have been added; therefore, the uuid in the example above will be\nconsistent across *all* configured targets.\n\nOf course, you can also delete globals with:\n\n```js\nlog.deleteGlobal('msg_uuid');\n```\n\n### Restricting targets to certain severities\n\n```js\n// high_priority.log will contain only errors and warns\nlog.addTarget('file', {file: '/tmp/high_priority.log'})\n\t.withLowestSeverity('warn');\n\n// debug.log will only store debug messages\nlog.addTarget('file', {file: '/tmp/debug.log'})\n\t.withLowestSeverity('debug')\n\t.withHighestSeverity('debug');\n\n// The console will only output trace messages\nlog.addTarget('console')\n\t.withHighestSeverity('trace');\n```\n\n### Restricting targets to certain types of messages\nSometimes, even within a severity level, it can be useful to filter out some\nkinds of log messages.  Bristol leverages its key/value logging to allow you\nto blacklist or whitelist messages on a target, based on the values of certain\nkeys.\n\n```js\n// Don't log messages with event=disconnect, OR messages for certain channels\nlog.addTarget('console')\n\t.withFormatter('human')\n\t.excluding({\n\t\tevent: 'disconnect',\n\t\tchannel: ['#help', /^#anime.*$/]\n\t});\n\n// Only log the trace messages with event starting with \"test\", from userId\n// 1, 2, or 3, and with destination set to a test server.\nlog.addTarget('file')\n\t.withFormatter('commonInfoModel')\n\t.withHighestSeverity('trace')\n\t.onlyIncluding({\n\t\tevent: /^test:/,\n\t\tuserId: [1, 2, 3],\n\t\tdestination: function(val) { return isTestServer(val); }\n```\n\nRestrictions on keys can be static types like strings or numbers, RegExp\nobjects to check for a match, functions to test the value each time the\ntarget is hit, or arrays of any of the above to allow more than one match.\nExclusions and inclusions can also be combined in one target to summon\nCaptain Planet.\n\n### More than one logger\nHave a use case that requires more than one 'log' object, so you can maintain\ndifferent sets of targets?  No problem:\n\n```js\nvar log2 = new log.Bristol();\n```\n\nThe default log object will remain the default, but now log2 is a completely\nindependent instance with zero configuration.\n\n### Extensions\nInstead of passing in a target or formatter as a string, you can pass your\nown functions!  Both of these modules are simply functions that take an\noptions object as the first argument, and context-specific arguments after\nthat.  Check out some of the built-in targets and formatters for examples.\nThey're super easy!\n\n## Testing\nTo test with full coverage report and enforcement of coverage percentage minimums:\n\n    npm test\n\nFor simple iterative testing, run just the mocha tests with: \n\n    npm run mocha\n\n## License\nBristol is distributed under the MIT license.\n\n## Credits\nBristol was created by Tom Shawver in 2014. Development of this library has been\nsponsored by [TechnologyAdvice](http://www.technologyadvice.com) and\n[Leadnomics](http://www.leadnomics.com).\n","maintainers":[{"name":"tomfrost","email":"tom@frosteddesign.com"}],"time":{"modified":"2022-06-13T05:06:46.016Z","created":"2014-04-07T20:21:20.778Z","0.2.0":"2014-04-09T05:54:15.798Z","0.2.1":"2014-04-09T19:47:22.719Z","0.2.2":"2014-04-28T20:20:10.405Z","0.3.0":"2014-06-20T05:15:44.845Z","0.3.1":"2014-07-03T14:24:24.805Z","0.3.2":"2014-07-18T14:32:29.060Z","0.3.3":"2015-10-02T18:39:21.937Z","0.4.0":"2018-03-19T03:04:04.324Z"},"readmeFilename":"README.md","homepage":"https://github.com/TomFrost/Bristol","keywords":["log","datatype","commoninfomodel","json"],"repository":{"type":"git","url":"git://github.com/TomFrost/Bristol.git"},"author":{"name":"Tom Shawver","email":"tom@frosteddesign.com"},"bugs":{"url":"https://github.com/TomFrost/Bristol/issues"},"license":"MIT"}