{"_id":"@1blckhrt/logger","_rev":"1-33ec138394091b77a413d296bcb8e017","name":"@1blckhrt/logger","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@1blckhrt/logger","version":"1.0.0","keywords":["logger"],"author":{"name":"1blckhrt"},"license":"ISC","_id":"@1blckhrt/logger@1.0.0","maintainers":[{"name":"1blckhrt","email":"blckhrt111@gmail.com"}],"homepage":"https://github.com/1blckhrt/logger#readme","bugs":{"url":"https://github.com/1blckhrt/logger/issues"},"dist":{"shasum":"1a70f29c4e4f3249ed4f5c0a8ef8a4152f309022","tarball":"https://registry.npmjs.org/@1blckhrt/logger/-/logger-1.0.0.tgz","fileCount":12,"integrity":"sha512-8EIPNAZ1ZOxfwt9BTcU359LipRXaQJb3psvMo3V5ivnpxMCRh7zsxx0osgrU6l1zXRiuLXXBF6bCt8NgGWu4Ww==","signatures":[{"sig":"MEQCIEKtA8bOowJ9oiPeADEu6BhueL2vRGJNtJ5fWZI/4bnXAiBkNiPPYAYGR67kroUu8icpIyos/mNycwmgP4eImkp5HA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16322},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.mjs","$schema":"https://json.schemastore.org/package.json","gitHead":"14d20844bbf2989578f4ecf34bcfeecf01b082d4","private":false,"scripts":{"fix":"pnpm run format && pnpm run lint","lint":"eslint --fix src","build":"tsup","format":"prettier --write .","prepare":"husky","lint:check":"eslint src","format:check":"prettier --check ."},"_npmUser":{"name":"1blckhrt","email":"blckhrt111@gmail.com"},"repository":{"url":"git+https://github.com/1blckhrt/logger.git","type":"git"},"_npmVersion":"10.9.2","description":"Simple logger written in TypeScript","directories":{},"_nodeVersion":"23.6.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","husky":"^9.1.7","eslint":"^8.57.0","prettier":"^3.4.2","typescript":"~5.5.4","@types/node":"^20.17.10","lint-staged":"^15.3.0","@commitlint/cli":"^19.5.0","eslint-config-neon":"^0.1.59","eslint-plugin-prettier":"^5.1.3","@commitlint/config-angular":"^19.5.0"},"_npmOperationalInternal":{"tmp":"tmp/logger_1.0.0_1737170741850_0.39713390388240266","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"$schema":"https://json.schemastore.org/package.json","name":"@1blckhrt/logger","description":"Simple logger written in TypeScript","version":"1.0.1","private":false,"type":"module","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","keywords":["logger"],"repository":{"type":"git","url":"git+https://github.com/1blckhrt/logger.git"},"scripts":{"build":"tsup","format":"prettier --write .","format:check":"prettier --check .","lint":"eslint --fix src","lint:check":"eslint src","fix":"pnpm run format && pnpm run lint","prepare":"husky"},"author":{"name":"1blckhrt"},"license":"ISC","devDependencies":{"@commitlint/cli":"^19.5.0","@commitlint/config-angular":"^19.5.0","@types/node":"^20.17.10","eslint":"^8.57.0","eslint-config-neon":"^0.1.59","eslint-plugin-prettier":"^5.1.3","husky":"^9.1.7","lint-staged":"^15.3.0","prettier":"^3.4.2","tsup":"^8.3.5","typescript":"~5.5.4"},"_id":"@1blckhrt/logger@1.0.1","gitHead":"2c0a7fde3f8ae5a3069d1af5a402008e71e24447","bugs":{"url":"https://github.com/1blckhrt/logger/issues"},"homepage":"https://github.com/1blckhrt/logger#readme","_nodeVersion":"23.6.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-O4qL89epHl1xe0GAu+LlkHHbw7SuBqVZtgNGv/ahirI4oYG2j0YAGrb7YTsoR0tLQn9IqjkTihaaRHvmcW+oPw==","shasum":"f72104b0815e87a5fa8d5c6297cfff8db1079682","tarball":"https://registry.npmjs.org/@1blckhrt/logger/-/logger-1.0.1.tgz","fileCount":6,"unpackedSize":15241,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgVHn4A9/bxTnq8RRmtU8KWn/6HwrLoW1bYuwzBrXolwIgI6U2m2vxQqdtJR2oZvEfHdqj9ra6WTCznEmd+KCNsao="}]},"_npmUser":{"name":"1blckhrt","email":"blckhrt111@gmail.com"},"directories":{},"maintainers":[{"name":"1blckhrt","email":"blckhrt111@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/logger_1.0.1_1737170998381_0.026328621508777017"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-18T03:25:41.749Z","modified":"2025-01-18T03:29:58.778Z","1.0.0":"2025-01-18T03:25:42.087Z","1.0.1":"2025-01-18T03:29:58.586Z"},"bugs":{"url":"https://github.com/1blckhrt/logger/issues"},"author":{"name":"1blckhrt"},"license":"ISC","homepage":"https://github.com/1blckhrt/logger#readme","keywords":["logger"],"repository":{"type":"git","url":"git+https://github.com/1blckhrt/logger.git"},"description":"Simple logger written in TypeScript","maintainers":[{"name":"1blckhrt","email":"blckhrt111@gmail.com"}],"readme":"# Logger\n\nA simple logger class for Node.js that supports different log levels, optional colors, and file logging.\n\n## Installation\n\n```sh\nnpm install @1blckhrt/logger\n```\n\n## Usage\n\n```typescript\nimport { Logger } from \"@1blckhrt/logger\";\n\nconst logger = new Logger({\n  enableColors: true,\n  logFilePath: \"./logs/app.log\",\n  logToFile: true,\n  prefix: \"MyApp\",\n  useTimestamps: true,\n});\n```\n\n## Logger Options\n\n- `enableColors` (boolean): Enable or disable colored output in the terminal. Default is `false`.\n- `logFilePath` (string): Path to the log file. Default is `null`.\n- `logToFile` (boolean): Enable or disable logging to a file. Default is `false`.\n- `prefix` (string): A prefix to add to each log message. Default is an empty string.\n- `useTimestamps` (boolean): Enable or disable timestamps in log messages. Default is `false`.\n\n## Methods\n\n### `debug(message: string): void`\n\nLogs a debug message.\n\n### `info(message: string): void`\n\nLogs an info message.\n\n### `success(message: string): void`\n\nLogs a success message.\n\n### `warn(message: string): void`\n\nLogs a warning message.\n\n### `error(message: Error | string): void`\n\nLogs an error message.\n\n## Example\n\n```typescript\nconst logger = new Logger({\n  enableColors: true,\n  logFilePath: \"./logs/app.log\",\n  logToFile: true,\n  prefix: \"MyApp\",\n  useTimestamps: true,\n});\n\nlogger.debug(\"Debugging...\");\nlogger.info(\"Information...\");\nlogger.success(\"Success!\");\nlogger.warn(\"Warning!\");\nlogger.error(\"An error occurred!\");\n```\n","readmeFilename":"README.md"}