{"_rev":"3-d7e9840bcbb14983e7aa091925a6c5bd","time":{"created":"2024-07-22T09:08:55.247Z","modified":"2024-07-22T09:08:55.780Z","1.0.0":"2024-07-22T09:05:22.119Z","1.0.1":"2024-07-22T09:08:55.510Z"},"_id":"@blockflow-labs/logger","name":"@blockflow-labs/logger","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@blockflow-labs/logger","version":"1.0.1","description":"A logger for just about everything blockflow","keywords":["blockflow","logger"],"author":"","license":"ISC","main":"dist/index.js","type":"dist/index.d.ts","scripts":{"test":"jest","package":"tsc -b && npm install -g .","build":"tsc","deploy":"npm publish --access public"},"devDependencies":{"@types/jest":"^29.5.12","jest":"^29.7.0","source-map-support":"^0.5.21","ts-jest":"^29.2.2","ts-node":"^10.9.2","typescript":"^4.5.0"},"dependencies":{"chalk":"^4.1.2"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"types":"./dist/index.d.ts","gitHead":"c2ae21d49beb04de61b7b012738f0623c8d8f0f5","_id":"@blockflow-labs/logger@1.0.1","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-C8PzoNTNmJNjFQDCrm2SPKvcGrJ04Peow1Mj3LPT3Pz4AhbB//9ok62FXxayjytrkAehfX2Hyc0HZhZg6gvvuQ==","shasum":"ed4f2405e5bc81d34ef1316a7a05f47f0d69417d","tarball":"https://registry.npmjs.org/@blockflow-labs/logger/-/logger-1.0.1.tgz","fileCount":15,"unpackedSize":16515,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICIlUrjbdv/CgHj0xhpjwQ8kGJZPO8BS/ZfguT96UDTlAiAHfFQCQPqsWUH7BL44tmyp9sfvSbFzy05SC7OLSxupMQ=="}]},"_npmUser":{"name":"blockflow-labs","email":"blockflowlabs@gmail.com"},"directories":{},"maintainers":[{"name":"blockflow-labs","email":"blockflowlabs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/logger_1.0.1_1721639335360_0.3387972009607969"},"_hasShrinkwrap":false}},"maintainers":[{"name":"blockflow-labs","email":"blockflowlabs@gmail.com"}],"description":"A logger for just about everything blockflow","keywords":["blockflow","logger"],"license":"ISC","readme":"# @blockflow-labs/logger\n\nA flexible and easy-to-use logging library for Blockflow CLI applications.\n\n## Installation\n\nYou can install this package using npm:\n\n```bash\nnpm install @blockflow-labs/logger\n```\n````\n\n## Usage\n\nHere's a basic example of how to use the logger:\n\n```typescript\nimport Logger from \"@blockflow-labs/logger\";\n\n// Create a new logger instance\nconst logger = new Logger({\n  level: \"debug\",\n  format: \"pretty\",\n  useColor: true,\n});\n\n// Log messages\nlogger.info(\"Application started\");\nlogger.warn(\"Low memory warning\");\nlogger.error(\"Failed to connect to database\");\nlogger.debug(\"Debugging information\");\n```\n\n### Configuration Options\n\nWhen creating a new Logger instance, you can pass an options object with the following properties:\n\n- `level`: The minimum level of messages to log. Can be 'error', 'warn', 'info', or 'debug'. Default is 'info'.\n- `format`: The output format. Can be 'pretty' or 'json'. Default is 'pretty'.\n- `useColor`: Whether to use colors in the output. Default is true.\n\n### Methods\n\n- `error(message: string)`: Log an error message.\n- `warn(message: string)`: Log a warning message.\n- `info(message: string)`: Log an info message.\n- `debug(message: string)`: Log a debug message.\n- `setFormat(format: 'json' | 'pretty')`: Change the output format.\n- `setUseColor(useColor: boolean)`: Enable or disable colored output.\n\n## Development\n\nTo set up the development environment:\n\n1. Clone the repository\n2. Install dependencies: `npm install`\n3. Run tests: `npm test`\n4. Run tests with coverage: `npm run test:coverage`\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the ISC License.\n","readmeFilename":"Readme.md"}