{"name":"loglevelnext","version":"2.0.0","description":"A modern logging library for Node.js and modern browsers that provides log level mapping to the console","license":"MIT","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":"index.js","engines":{"node":">= 6"},"scripts":{"build":"npm run build:dev && npm run build:prod","build:dev":"NODE_ENV=development wp","build:prod":"NODE_ENV=production wp","ci":"npm run cover -- --report lcovonly && npm run lint && npm run test","check-node":"check-node-version --node 10","cover":"istanbul cover node_modules/mocha/bin/_mocha","lint":"eslint index.js lib test","test":"npm run test:node && npm run test:browser","test:browser":"if npm run check-node -- --silent; then mocha-chrome test/tests/browser/entry.html; else npm run test:browser:skip; fi","test:browser:skip":"echo \"\\nSkipping Browser Test\\n\\n\\033[32mTests Completed Successfully\\033[0m\"","test:node":"mocha --full-trace --check-leaks"},"files":["dist/","factory/","lib/","index.js"],"keywords":["browser","console","debug","error","level","levels","log","logger","logging","loglevel","persist","persistent","plugins","prefix","trace","warn"],"dependencies":{"es6-symbol":"^3.1.1","object.assign":"^4.1.0"},"devDependencies":{"@babel/cli":"^7.0.0-beta.46","@babel/core":"^7.0.0-beta.46","@babel/polyfill":"^7.0.0-beta.46","@babel/preset-env":"^7.0.0-beta.46","@babel/register":"^7.0.0-beta.46","assert":"^1.4.1","babel-loader":"^8.0.0-beta.2","better-assert":"github:devinrhode2/better-assert-browser","chalk":"^2.3.0","check-node-version":"^3.1.1","codecov":"^3.0.4","eslint":"^5.3.0","eslint-config-webpack":"^1.2.5","eslint-plugin-import":"^2.8.0","istanbul":"^0.4.5","mocha":"^5.1.1","mocha-chrome":"^1.0.2","sinon":"^6.1.5","webpack":"^4.0.0","webpack-command":"^0.4.1"},"types":"types/index.d.ts","gitHead":"a4afe666965d14e01ea7928fd7e154e066125956","bugs":{"url":"https://github.com/shellscape/loglevelnext/issues"},"_id":"loglevelnext@2.0.0","_npmVersion":"6.1.0","_nodeVersion":"10.1.0","_npmUser":{"name":"shellscape","email":"andrew@shellscape.org"},"dist":{"integrity":"sha512-UH+8ObdXhU8VmkIjkcKohSscn0cUkky71SfSMFC6ZrQIlnENRHEc+9r79KR9x3lPBLxjjlDW4u9IVFYMU/br5g==","shasum":"c992d67f6fafb4bc956b580a45815833a3e6643f","tarball":"http://registry-npm.ywwl.com/loglevelnext/download/loglevelnext-2.0.0.tgz","fileCount":10,"unpackedSize":92318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbupXCRA9TVsSAnZWagAAt14P/idWGM5Ub9271m80E+2O\nyOSdR5E0AEOi4UWrq5S7VhzFwV/r4bkIsBpPxf4YDyp+IlKktWRZt+Q+zJye\n9EMXDJsGHas3f3BoNFsCWCxRmjNxr6I2o2xYpGCnuafVPV+d/G/3DuzGNpSi\n+YNafX0KcRM2Fhm15O9Q6ny8Ot/8OOLEEYKoXvm61VXorufMv6xZi8KdPSfA\n8T9dMzVhUkmyGX6fz+vlkOQEN3xgVfXAqYFpfVedyyWqdFL3VPdPgkOkYuMH\nR8FmYiaR04pI0OClE9DMnDLXBqzMMmUV6u8u45XJIh0z9wNtOcMKf+Cjlt1e\nQijoLyMWh8YbKq0/qFjgnShivcs7OqQ9CqogZAkNy9EUosAYUjTIohBuycUA\nwGgzl3og80FmHva/VgyKSJZeIsMZ6XYJJCw+moXaIcIhUgOqN2PlUoGmzhXD\nVLd9QwSEUD8Qm9bF6+/9VZrZezSwqxTYdb2aIR6zBU78wWqAh6hqmCBRC+H6\nKrSMhUDNHN5vGq3fzk2Wb/VzIExk3ubocnY63VYgoXdbi/Vt9Q/V+RXMYAx/\nWUPLRcWB5PxLr/14/uwwV030PgDr4MqxEdbNenzHOH3k/UhDz9xSxldCjmmY\nhrsd/njuEZ4QhODK6bT+ij//rRgB3MFnGhYjK0Q9FE8TyU2ex2tdF6jYLp2q\nXA7M\r\n=Y8Qz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDYdcdeMe4ABR3iwbNMqlffzLxer3JoVa9xqcP8bsQlwIgeAhh1Klgksg1Ebb4VaPb33kMPiX/5MyWTKfYL+zQuqE="}],"size":22752,"noattachment":false,"key":"/loglevelnext/-/loglevelnext-2.0.0.tgz"},"maintainers":[{"name":"shellscape","email":"andrew@shellscape.org"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/loglevelnext_2.0.0_1533995607261_0.3004169524956537"},"_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":1533995607345,"_cnpm_publish_time":1533995607345,"dist-tags":{"latest":"6.0.0"}}