{"_id":"@avkad17/logger","name":"@avkad17/logger","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@avkad17/logger","version":"0.0.1","description":"Logger service including accessibility to cloudwatch, sentry and slack notifications.","main":"lib/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"husky install"},"repository":{"type":"git","url":"git+https://github.com/avkad1/logger.git"},"keywords":["logging","logger"],"author":{"name":"Avinash Ramesha"},"license":"UNLICENSED","dependencies":{"@aws-sdk/client-cloudwatch-logs":"3.316.0","@sentry/node":"7.49.0","@sentry/tracing":"7.49.0","axios":"1.7.9","lodash.isempty":"4.4.0","lodash.omit":"4.5.0","winston":"3.8.2","winston-cloudwatch":"6.3.0"},"devDependencies":{"husky":"8.0.3","prettier":"2.8.7"},"engines":{"node":">=18.12.1"},"directories":{"lib":"lib"},"bugs":{"url":"https://github.com/avkad1/logger/issues"},"homepage":"https://github.com/avkad1/logger#readme","_id":"@avkad17/logger@0.0.1","gitHead":"f933eb47d0cff19d2466e51c701ebe259e5b1242","_nodeVersion":"22.2.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-jx9rzy2y1jCCxi7qravzjMHPjjgtbXxAf8Rs7gymPuva3/6R0IzITHRjZJvvMOOVr8dFoUZgXvIruiJ0lsDaiQ==","shasum":"ff991157eed469ba587606822d80c934e6630d0b","tarball":"https://registry.npmjs.org/@avkad17/logger/-/logger-0.0.1.tgz","fileCount":4,"unpackedSize":12896,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBCdMginOKXAtV7WXqHwP4PjLDqaCDwe7PdUsQdEfjhuAiEAsgQRqPJaXqqSIG1lKthpeh6n4n32wQZlMEHpChqvJkQ="}]},"_npmUser":{"name":"avkad17","email":"avinash.ramesha@springworks.in"},"maintainers":[{"name":"avkad17","email":"avinash.ramesha@springworks.in"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/logger_0.0.1_1734841194650_0.17595672164784792"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-22T04:19:54.546Z","0.0.1":"2024-12-22T04:19:54.828Z","modified":"2024-12-22T04:19:55.134Z"},"maintainers":[{"name":"avkad17","email":"avinash.ramesha@springworks.in"}],"description":"Logger service including accessibility to cloudwatch, sentry and slack notifications.","homepage":"https://github.com/avkad1/logger#readme","keywords":["logging","logger"],"repository":{"type":"git","url":"git+https://github.com/avkad1/logger.git"},"author":{"name":"Avinash Ramesha"},"bugs":{"url":"https://github.com/avkad1/logger/issues"},"license":"UNLICENSED","readme":"# @avkad17/logger\n\nLogger for cloudwatch, loggly and sentry. Used in trivia and trivia related projects mainly.\n\n## Get started\n\nThis is a simple logger package that can be used to log messages and errors to cloudwatch, loggly and sentry. By default, locally only console is the available transport. For other environments, optionally loggly can be enabled. Sentry is also optional.\n\n### Installation\n\n```console\n    npm install --save @avkad17/logger\n\n    // OR\n\n    yarn add @avkad17/logger\n```\n\n---\n\n### Usage\n\n```javascript\nconst Logger = require(\"@avkad17/logger\");\nconst app = new Express();\n\n// get logger instance\nconst logger = new Logger();\n\n// initialize transports\n// loggly token, if not needed, pass null.\n// default level and tag are required.\n// forceConsole is optional. If true, console transport will be enabled even in production.\nlogger.initializeTransports(\"warn\", \"lounge\", false);\n\n// NOTE: do this only for environments you need.\n// Initialize sentry\nconst SENTRY_DSN = \"sentry-dsn-for-project\";\n// first param is the express router, second is the sentry dsn\n// ignoreErrors([]) and tracing sampling rate(0.5) are optional.\n// all of the bwlow are optional\n// ignoreUrls - array of urls to ignore or skipped from tracing. By default /health is ignored\n// customUrls - array of urls to be traced with a different sampling rate than default.\n// customSamplingRate - sampling rate for customUrls\nlogger.initializeSentry(app, SENTRY_DSN, [\"connect ECONNRESET\"], 0.8, {\n  ignoreUrls: [], // tracing set to 0; optional\n  customURLs: [], // tracing set to value passed in; optional\n  customURLsSampleRate: 0.25, // tracing set to 0.25 for all urls in customURLs; optional - defaults to 0.1\n});\n```\n","readmeFilename":"README.md"}