{"name":"loglevelnext","version":"3.0.1","description":"A modern logging library for Node.js and modern browsers that provides log level mapping to the console","license":"MPL","repository":{"type":"git","url":"git+https://github.com/shellscape/loglevelnext.git"},"author":{"name":"Andrew Powell","email":"andrew@shellscape.org"},"homepage":"https://github.com/shellscape/loglevelnext","main":"lib/index.js","engines":{"node":">= 6.14.4"},"scripts":{"ci:coverage":"nyc npm run test && nyc report --reporter=text-lcov > coverage.lcov","ci:lint":"npm run lint && npm run security","ci:lint:commits":"commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}","ci:test":"npm run test","commitlint":"commitlint","commitmsg":"commitlint -e $GIT_PARAMS","lint":"eslint --fix --cache lib test","lint-staged":"lint-staged","security":"npm audit","test":"ava"},"dependencies":{},"devDependencies":{"@commitlint/cli":"^7.1.2","@commitlint/config-conventional":"^7.1.2","ava":"^1.3.1","chalk":"^2.3.0","eslint":"^5.15.1","eslint-config-shellscape":"^2.0.2","eslint-plugin-import":"^2.8.0","lint-staged":"^8.1.0","nyc":"^14.1.0","pre-commit":"^1.2.2","sinon":"^7.2.3","standard-version":"^5.0.1"},"types":"types/index.d.ts","keywords":["browser","console","debug","error","level","levels","log","logger","logging","loglevel","persist","persistent","plugins","prefix","trace","warn"],"pre-commit":"lint-staged","lint-staged":{"*.js":["eslint --fix","git add"]},"gitHead":"cc35e2878fc82a1c3dcde7ef6ac16e2e15164873","bugs":{"url":"https://github.com/shellscape/loglevelnext/issues"},"_id":"loglevelnext@3.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"dist":{"integrity":"sha512-JpjaJhIN1reaSb26SIxDGtE0uc67gPl19OMVHrr+Ggt6b/Vy60jmCtKgQBrygAH0bhRA2nkxgDvM+8QvR8r0YA==","shasum":"e3e4659c4061c09264f6812c33586dc55a009a04","tarball":"http://registry-npm.ywwl.com/loglevelnext/download/loglevelnext-3.0.1.tgz","fileCount":9,"unpackedSize":33502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczebmCRA9TVsSAnZWagAAqcYP/iLbOY9yCKfzGihgbDIR\nlI9k6BVfmU5Oh1MCU+NtUdtVl9q0xepAmVDugD08KDjyCJDP4PNMiXpcF7Hg\nKer948oUYM4Fd2B8v4EqFwKoIKS900EpA8F+DoZSgPJvowaBBE/6JBXIPqdo\nt5iZrtNVlgZqEO+RFZXCl22l2T2SnbQK8CEPCxAcCrXzMHtoN5I7frCDaa+k\nGs1oZaKc3bwwiSJRPQBQqFMN5jSSLH+xZfPGL0DxoI7LCGytYx1ncz0N2U8M\nM45Ow82rDX7eXtfbwcOqlfHRLNmcAwWUWXl9TEUUm+oJ8C34g49dt3qSZ3A6\n7YDlpITfWonGhBF5mSKhMDL+EXbqkwE2j2jyhpR13v87rl/ONQdE9gkyrttu\n6Oo2MU63f+fCJ0cJy8aeaCXNqIKDNLslxzSc36QA+CbJW3H3ZE5B/JIuE3TE\nrA5ZcaSQhuJ7Wl++Au5UmpneL3zZy+k/o6u1fMjmU4ylNLVUJR0wt1fAsRcI\n3h9XjWQ9xvcACHeyc0eCQbnwKUGUvrC3hpwH581u4ddPh996TNDLeVEiGHCX\nE9DTvvIrGtsHjmxIwilvfGO73Nw7Q97EuSf4kKIEwAszoKJKUVxUTQdVm6xu\nSbO99J0J1U+B/JYb5K8zI6+eHqgRd7OA5YWVq/5QP5tpHuSBZ0k9/nB/2NA1\nQ8Zm\r\n=sGWi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFCj+x80BCKzUQD4o35eC/pbpkVsKs4FTeeeTFB8+sKoAiEA0vQ0WehRdcD93ZhbqvYp4G5gTqy0w3QG++nZccKhnvE="}],"size":10743,"noattachment":false,"key":"/loglevelnext/-/loglevelnext-3.0.1.tgz"},"maintainers":[{"name":"shellscape","email":"andrew@shellscape.org"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/loglevelnext_3.0.1_1556997862192_0.6841777173243446"},"_hasShrinkwrap":false,"readme":"[tests]: https://img.shields.io/circleci/project/github/shellscape/loglevelnext.svg\n[tests-url]: https://circleci.com/gh/shellscape/loglevelnext\n[cover]: https://codecov.io/gh/shellscape/loglevelnext/branch/master/graph/badge.svg\n[cover-url]: https://codecov.io/gh/shellscape/loglevelnext\n[size]: https://packagephobia.now.sh/badge?p=loglevelnext\n[size-url]: https://packagephobia.now.sh/result?p=loglevelnext\n[loglevel]: https://githhub.com/pimterry/loglevel\n[loglevelpre]: https://github.com/kutuluk/loglevel-plugin-prefix\n[methodfactory]: lib/factory/MethodFactory.js\n[prefixfactory]: lib/factory/PrefixFactory.js\n\n<div align=\"center\">\n  <img width=\"150\" height=\"150\" src=\"http://shellscape.org/assets/images/external/loglevelnext-icon.svg\">\n</div>\n<br/>\n\n[![tests][tests]][tests-url]\n[![cover][cover]][cover-url]\n[![size][size]][size-url]\n\n# loglevelnext\n\n`loglevelnext` is a modern logging library for Node.js and modern browsers, written with modern patterns and practices which provides log level mapping of the `console` object.\n\nFor browser use, or use in client-side applications, `loglevelnext` should be bundled by your preferred bundler or compiler, such as [Rollup](https://rollupjs.org).\n\n## Getting Started\n\nFirst thing's first, install the module:\n\n```console\nnpm install loglevelnext --save\n```\n\n## Usage\n\nUsers can choose to use `loglevelnext` in Node.js or in the client (browser).\n\n```js\nconst log = require('loglevelnext');\n\nlog.info('bananas!');\n```\n\n## Log Levels\n\nBy default `loglevelnext` ships supporting the following log level name-value\npairs:\n\n```js\n{\n  TRACE: 0,\n  DEBUG: 1,\n  INFO: 2,\n  WARN: 3,\n  ERROR: 4,\n  SILENT: 5\n}\n```\n\n## Default Logger\n\nWhen requiring `loglevelnext` in Node.js the default export will be an instance of [`LogLevel`](docs/LogLevel.md) wrapped with some extra sugar.\n\n### Methods\n\nPlease see [`LogLevel`](docs/LogLevel.md) for documentation of all methods and properties of every log instance, including the default instance.\n\n#### `trace`, `debug`, `info`, `warn`, `error`\n\nThese methods correspond to the available log levels and accept parameters identical to their `console` counterparts. e.g.\n\n```js\nconsole.info('...');\nconsole.info('...');\n// ... etc\n```\n\n#### `create(options)`\n\nReturns a new `LogLevel` instance. The `options` parameter should be an `Object` matching the options for the [`LogLevel`](docs/LogLevel.md) constructor.\n\n_Note: `LogLevel` instances created are cached. Calling `create` with a previously used `name` will return the cached `LogLevel` instance. To create a different instance with the same `name`, assign a unique `id` property to the `options` parameter._\n\n### Properties\n\n#### `factories`\n\nType: `Array [ Class ]`\n\nReturns an `Array` containing the factory classes available within `loglevelnext`\nto outside modules. Particularly useful when creating plugins. eg.\n\n```js\nconst log = require('loglevelnext');\nconst { MethodFactory } = log.factories;\nclass MyFactory extends MethodFactory { ... }\n```\n\n#### `loggers`\n\nType: `Array [ LogLevel ]`\n\nReturns an `Array` containing references to the currently instantiated loggers.\n\n## Factories aka Plugins\n\nIf you're used to using plugins with `loglevel`, fear not. The same capabilities\nare available in `loglevelnext`, but in a much more straightforward and structured\nway. `loglevelnext` supports by way of \"Factories.\" A `Factory` is nothing more\nthan a class which defines several base methods that operate on the `console`\nand provide functionality to a `LogLevel` instance. All factories must inherit from the\n[`MethodFactory`][methodfactory] class, and may override any defined class functions.\n\nFor an example factory, please have a look at the [`PrefixFactory`][prefixfactory]\nwhich provides similar functionality as the [loglevel-prefix](loglevelpre) plugin,\nand is the factory which is used when a user passes the `prefix` option to a\n`LogLevel` instance.\n\n## Browser Support\n\nAs mentioned, `loglevelnext` is a logging library for Node.js and _modern_ browsers, which means the latest versions of the major browsers. When bundling or compiling `loglevelnext` for use in a browser, you should ensure that appropriate polyfills are used. e.g. Internet Explorer typically requires polyfilling both `Symbol` and `Object.assign`.\n\n## Attribution\n\n_This project originated as a fork of the much-loved [loglevel](loglevel) module, but has diverged and has been rewritten, and now shares similarities only in functional intent._\n\nBase Log SVG by [Freepik](http://www.freepik.com/) from [www.flaticon.com](http://www.flaticon.com).\n\n## Meta\n\n[CONTRIBUTING](./.github/CONTRIBUTING)\n\n[LICENSE (Mozilla Public License)](./LICENSE)\n","publish_time":1556997862308,"_cnpm_publish_time":1556997862308,"dist-tags":{"latest":"6.0.0"}}