{"name":"@slack/logger","version":"4.0.1","keywords":["slack","logging"],"author":{"name":"Slack Technologies, LLC"},"license":"MIT","_id":"@slack/logger@4.0.1","maintainers":[{"name":"slackhq","email":"opensource@slack.com"},{"name":"ajm","email":"macdonald.andrew@gmail.com"},{"name":"sgorbach0v","email":"sgorbachov@slack-corp.com"},{"name":"stevegill","email":"stevengill97@gmail.com"},{"name":"slack_biztech","email":"it@slack-corp.com"},{"name":"misscoded","email":"alissa.renz@gmail.com"},{"name":"mwbrooks","email":"michael@michaelbrooks.ca"},{"name":"cchensh","email":"cchensh88@gmail.com"},{"name":"evegeris","email":"evegeris@salesforce.com"},{"name":"e-zim","email":"eden.zimbelman@salesforce.com"}],"homepage":"https://docs.slack.dev/tools/node-slack-sdk/","bugs":{"url":"https://github.com/slackapi/node-slack-sdk/issues"},"dist":{"shasum":"d8eed47117b6b106c976f5f76c9e5845f6de721b","tarball":"http://registry-npm.ywwl.com/@slack/logger/download/@slack/logger-4.0.1.tgz","fileCount":7,"integrity":"sha512-6cmdPrV/RYfd2U0mDGiMK8S7OJqpCTm7enMLRR3edccsPX8j7zXTLnaEF4fhxxJJTAIOil6+qZrnUPTuaLvwrQ==","signatures":[{"sig":"MEYCIQCIfU+MrSZGMcgIeCEMcmhv4JM9SgMsqvJ48h3gbePp1wIhALkConkkbhjSVDQttBDGNK++fXylhM8yko3pyIOus+QD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@slack%2flogger@4.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13844,"size":4703,"noattachment":false,"key":"/@slack/logger/-/@slack/logger-4.0.1.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"npm":">= 8.6.0","node":">= 18"},"gitHead":"909b5bd1a453046a20a9d416deca589c215aa783","scripts":{"docs":"npx typedoc --plugin typedoc-plugin-markdown","test":"npm run test:unit","build":"npm run build:clean && tsc","prepack":"npm run build","test:unit":"npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/index.test.ts","build:clean":"shx rm -rf ./dist","test:node18":"npm run build && node --test --test-reporter=spec --import tsx --test src/index.test.ts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:87d4450c-e0e8-4388-ba94-e377eb679c93"}},"repository":{"url":"git+https://github.com/slackapi/node-slack-sdk.git","type":"git"},"_npmVersion":"11.9.0","description":"Logging utility used by Node Slack SDK","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@types/node":">=18"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/logger_4.0.1_1773362862142_0.8404692733076189","host":"s3://npm-registry-packages-npm-production"},"readme":"# Slack Logger\n\n[![codecov](https://codecov.io/gh/slackapi/node-slack-sdk/graph/badge.svg?token=OcQREPvC7r&flag=logger)](https://codecov.io/gh/slackapi/node-slack-sdk)\n\nThe `@slack/logger` package is intended to be used as a simple logging interface that supports verbosity levels.\n\n## Requirements\n\nThis package supports Node v20 and higher. It's highly recommended to use [the latest LTS version of\nnode](https://github.com/nodejs/Release#release-schedule), and the documentation is written using syntax and features\nfrom that version.\n\n## Installation\n\n```shell\n$ npm install @slack/logger\n```\n\n## Usage\n\nThis package exports a `ConsoleLogger` class, a generic `Logger` interface and a `LogLevel` enum.\nThe source code is short (~150 lines of code), so check out `src/index.ts` for details, but the `ConsoleLogger` API\nmimics the default node `console` API with three additions:\n\n- `getLevel()`: returns the currently-specific `LogLevel` of the logger.\n- `setLevel(LogLevel)`: sets the `LogLevel` of the logger.\n- `setName(string)`: sets a prefix to display in logs. Useful if you have multiple loggers active.\n\n### Example\n\nThis short snippet shows various `Logger` levels and customized labels:\n\n```javascript\nconst { ConsoleLogger, LogLevel } = require(\"@slack/logger\");\n\nconst logger = new ConsoleLogger();\n\nlogger.error(\"a problem happened\");\nlogger.warn(\"might need attention\");\nlogger.info(\"take note of this\");\nlogger.debug(\"or dig into details\");\n\nlogger.setName(\"HAL\");\nlogger.setLevel(LogLevel.DEBUG);\n\nlogger.info(\"what an observation\");\nlogger.debug(\"i am so interested\");\n```\n\nWhen run, messages that match the following values are logged:\n\n```txt\n[ERROR]   a problem happened\n[WARN]   might need attention\n[INFO]   take note of this\n[INFO]  HAL what an observation\n[DEBUG]  HAL i am so interested\n```\n\n## Getting Help\n\nIf you get stuck, we're here to help. The following are the best ways to get assistance working through your issue:\n\n- [Issue Tracker](http://github.com/slackapi/node-slack-sdk/issues) for questions, feature requests, bug reports and\n  general discussion related to this package. Try searching before you create a new issue.\n- [Email us](mailto:developers@slack.com) in Slack developer support: `developers@slack.com`\n","publish_time":1773362862319,"_cnpm_publish_time":1773362862319,"dist-tags":{"latest":"5.0.0","rc":"5.0.0-rc.1"}}