{"name":"loggy","version":"1.0.8","description":"Dead-simple colored logger for stdout.","scripts":{"test":"eslint . && node test.js"},"repository":{"type":"git","url":"git+https://github.com/paulmillr/loggy.git"},"keywords":["log","logger","tasty","simple"],"author":{"name":"Paul Miller","url":"paulmillr.com"},"license":"MIT","dependencies":{"colorette":"~1.1","native-notifier":"~0.1.6"},"devDependencies":{"eslint":"^6","eslint-config-brunch":"^1.0.0"},"eslintConfig":{"extends":"brunch"},"gitHead":"7565833c0bda912faa486762d04f0b675e83a3bb","bugs":{"url":"https://github.com/paulmillr/loggy/issues"},"homepage":"https://github.com/paulmillr/loggy#readme","_id":"loggy@1.0.8","_nodeVersion":"10.16.3","_npmVersion":"6.11.3","dist":{"integrity":"sha512-3gXR0rOS4fnxVXGeiQID95/IML//jSbKx5T1GatifpzpOwDoOsTtlt25gosiBq27Mn4YnbzWB/DsKncnaLWKSg==","shasum":"82b3717b85d9d23090dd0367acfc2abc5fa6e4fb","tarball":"http://registry-npm.ywwl.com/loggy/download/loggy-1.0.8.tgz","fileCount":5,"unpackedSize":15784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjOe+CRA9TVsSAnZWagAADVoP/iBNJChjlFG2LiyYdoCX\nVpSOLdnJqZpXgZJXkNSnIUMCwjGhRgK7VyHReAsFcTJUmV45n5LfTPK2oK5m\nNyZupoYdCkqhGuRjXY8wQDFktojyXD2vzDi87cxUyrvZSRp65yvyrYFnq0lc\nSegpv6OmblWg8a2S2/RK1gggwcdxSVMBYwFalF1GOZ1YzAw58Nl+4UtbMtlW\nRJ1j68K7fze5+/CN/g+EXlbyWZZ4sw8BDN17DrePFDtIu9BJ5zGVH1hcpFFJ\nJojmI3w3cA52TEM37XOHHfYZQYmDg1qh97sbWU+pdnBZ6H6tGi1iKXCRLchf\nbuRWUUSoJqhTy3RN6ZK6NE9YxZ2pK14y7yQQf4YGyqVfMXfUDuxgoA8gyVij\npMFFnJ+Obyy8lxg1Boy2CNRiUyKghjQtF5pILzXRYxfa2VkHcZ2glGKbSZRK\neyoER0jQu6+4OUsefDj95sIP9T//mJUtVb2JbVeQkk+OVFFliGF635NiRxgq\nWaX9C2Ejd1PNMU290McEDMtcW1tLL+4HZ4edLnr4c5EETBAKrowYWsd+skh1\nqk6MXaPr9UeuTN0v9oqA+OlikHn9wXyCZ74b4s8B8hLo3nVGSRfkKc3ZYaW1\nISWzoGkvcI+6YN+oa1dgAuBcvvxuYPZSesB+mZf8TLI8ip7EpY7D2x0KyxZw\nvbFz\r\n=3NFE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHJrlTyJSQgb9pL3ApRmMsT44ay2G6Kl6xNo3sVAxjyQAiEAzlr2LPqf6ekOlPAp9w8k5114IM1eVxhMpsqcXQPBBdc="}],"size":11679,"noattachment":false,"key":"/loggy/-/loggy-1.0.8.tgz"},"maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"},{"name":"shvaikalesh","email":"shvaikalesh@gmail.com"}],"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/loggy_1.0.8_1569515453385_0.022854325432374534"},"_hasShrinkwrap":false,"readme":"# loggy\n\nColorful stdstream dead-simple logger for node.js.\n\n* Logs stuff to stdout (`log`, `info`, `success`).\n* Logs errors & warnings to stderr (`warn`, `error`).\n* Adds colors to log types (e.g. `warn`, `info` words will be colored). Uses lightweight [colorette](https://github.com/jorgebucaran/colorette).\n* Emits system notifications for errors with [native-notifier](https://github.com/paulmillr/native-notifier).\n* Tracks whether any error was logged (useful for changing process exit code).\n* No 3rd-party deps (Growl etc.)\n\n<img width=\"762\" alt=\"Screen Shot 2019-09-26 at 18 51 56\" src=\"https://user-images.githubusercontent.com/574696/65704227-d0870c00-e08e-11e9-8d65-41ed6c1ecc59.png\">\n\n![Screen Shot 2013-04-21 at 03 26 41](https://cloud.githubusercontent.com/assets/574696/22355836/d5a57152-e435-11e6-8b22-6aca8b4e79b1.png)\n\nInstall with `npm install loggy`.\n\n## Usage\n\nExample:\n\n```javascript\nconst logger = require('loggy');\n\n// \"05:48:30 - log: Hello, loggy\" to stdout.\n// \"info\" word is cyan.\nlogger.info('Hello', 'loggy');\n\n// \"05:48:30 - warn: Deprecated\" to stderr.\n// \"warn\" word is yellow.\nlogger.warn('Deprecated');\n\n// Logs \"05:48:30 - error: Oops\" to stderr.\n// \"error\" word is red.\n// Emits system notifications with title \"Error\" and message \"Oops”.\nlogger.error('Oops');\n\n// Exit with proper code.\nprocess.on('exit', () => {\n   process.exit(logger.errorHappened ? 1 : 0);\n});\n\n// Disable colors.\nlogger.colors = false;\n\n// Disable system notifications.\nlogger.notifications = false;\n\n// Enable notifications for more methods\nlogger.notifications = ['error', 'warn', 'success'];\n\n// Prepend the notifications title\nlogger.notificationsTitle = 'My App';\n\n// Dump stacks of Error objects in errors or warnings\nlogger.dumpStacks = true; // or color of your choice\n```\n\nEnvironment variables:\n\n* `LOGGY_STACKS`: default value for `dumpStacks`. Pass `1` to see the stacks.\n* `FORCE_NO_COLOR`: disables color output in `chalk`. Does not affect `logger.colors`.\n\nMethods:\n\n* `logger.error(...args)` - logs messages in red to stderr, creates notification.\n* `logger.warn(...args)` - logs messages in yellow to stdout.\n* `logger.log(...args)` - logs messages in cyan to stdout.\n* `logger.info`, `logger.success` - logs messages in green to stdout.\n* `logger.format(level)` - function that does color and date formatting.\n\nParams:\n\n* `logger.colors` - mapping of log levels to colors.\n  Can be object, like `{error: 'red', log: 'cyan'}` or `false` (disables colors).\n* `logger.errorHappened` - `false`, changes to `true` if any error was logged.\n* `logger.notifications` - As Boolean, enables or disables notifications for errors, or\n  as Array, list types to trigger notifications, like `['error', 'warn', 'success']`.\n* `logger.notificationsTitle` - String, optional, prepends title in notifications.\n\n## License\n\n[MIT](https://github.com/paulmillr/mit) (c) 2016 Paul Miller (http://paulmillr.com)\n","publish_time":1569515453659,"_cnpm_publish_time":1569515453659,"dist-tags":{"latest":"1.0.8"}}