{"id":21765712,"url":"https://github.com/mutasim77/logify","last_synced_at":"2026-02-21T04:03:44.057Z","repository":{"id":247730697,"uuid":"826355468","full_name":"mutasim77/logify","owner":"mutasim77","description":"📝 A powerful, flexible, and easy-to-use logging library for JS/TS projects. 🗃️","archived":false,"fork":false,"pushed_at":"2024-07-10T07:57:04.000Z","size":61,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-24T16:52:40.494Z","etag":null,"topics":["logging","logging-library","logify","nextjs","ts"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/logify-ts","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mutasim77.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-09T14:48:29.000Z","updated_at":"2024-07-31T00:01:06.000Z","dependencies_parsed_at":"2024-07-10T09:54:43.649Z","dependency_job_id":null,"html_url":"https://github.com/mutasim77/logify","commit_stats":null,"previous_names":["mutasim77/logify"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mutasim77/logify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutasim77%2Flogify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutasim77%2Flogify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutasim77%2Flogify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutasim77%2Flogify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mutasim77","download_url":"https://codeload.github.com/mutasim77/logify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutasim77%2Flogify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T03:11:15.450Z","status":"ssl_error","status_checked_at":"2026-02-21T03:10:34.920Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logging","logging-library","logify","nextjs","ts"],"created_at":"2024-11-26T13:13:36.416Z","updated_at":"2026-02-21T04:03:44.027Z","avatar_url":"https://github.com/mutasim77.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg width=\"780\" alt=\"Banner\" src=\"https://github.com/mutasim77/logify/assets/96326525/288cfbb2-b1b0-4731-85f1-efee2747dd9a\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    📝 Logify is a powerful, flexible, and easy-to-use logging library for JS/TS projects. 🗃️\n\u003c/p\u003e\n\n## Features 🚀\n\n- 🔴 Multiple log levels (ERROR, WARN, INFO, DEBUG)\n- 🎨 Customizable formatters (Text and JSON)\n- 🔌 Extensible transport system (Console and File included)\n- ⚙️ Fully configurable\n- 📱 React and Next.js(and any JS lib) friendly\n- 🛡️ Written in TypeScript for type safety\n\n## Installation 📦\n\n```bash\nnpm install logify-ts\n```\n\n## Quick Start 🏃‍♂️\nHere's an example of how to use the logger in a Next.js API route:\n\n1. Create a file called logger.ts\n```\nyour-project\n    |_ app \n    |_ public\n    |_ logger.ts 👈\n```\n\nAdd the following code in logger.ts file\n\n```js\nimport { Logger, LogLevel, ConsoleTransport, FileTransport, JsonFormatter } from 'logify-ts';\n\nexport const logger = new Logger({\n    level: LogLevel.DEBUG,\n    transports: [\n        new ConsoleTransport(),\n        new FileTransport('app.log', new JsonFormatter())\n    ]\n});\n```\n\n\u003e [!NOTE]\n\u003e Logify is a flexible logging library that allows you to easily configure multiple transports and formatters for your logs.\n\n2. Use logger in an API route\nCreate a file `api/test/route.ts` inside app dir\n\n```\nyour-project\n    |_ app \n    |  |_api 👈\n    |    |_test 👈\n    |       |_route.ts 👈\n    |\n    |_ public\n    |_ logger.ts \n```\n\n```js\nimport { logger } from \"@/logger\";\nimport { NextRequest, NextResponse } from \"next/server\";\n\nexport async function GET(req: NextRequest) {\n    logger.info(`Incoming GET request to /api/logger`);\n\n    // Log request details\n    logger.debug('Request details', {\n        url: req.url,\n        method: req.method,\n        headers: Object.fromEntries(req.headers),\n    });\n\n    // Log query parameters\n    const searchParams = req.nextUrl.searchParams;\n    logger.debug('Query parameters', Object.fromEntries(searchParams));\n\n    try {\n        // Simulate some processing\n        const result = await someAsyncOperation();\n\n        logger.info('Operation successful', { result });\n\n        return NextResponse.json({\n            message: \"success\",\n            status: 200,\n            data: result\n        });\n    } catch (error) {\n        logger.error('Error in GET /api/logger', {\n            error: error instanceof Error ? error.message : 'Unknown error',\n            stack: error instanceof Error ? error.stack : undefined\n        });\n\n        return NextResponse.json({\n            message: \"Internal server error\",\n            status: 500,\n        }, { status: 500 });\n    } finally {\n        logger.debug('Request processing completed');\n    }\n}\n\nasync function someAsyncOperation() {\n    await new Promise(resolve =\u003e setTimeout(resolve, 100));\n    return { key: 'value' };\n}\n```\n\n\u003e [!NOTE]\n\u003e This example provides a practical, real-world use case of your logger in a Next.js API route. It's concise yet informative, showing how to log different types of information at various stages of request processing.\n\n\n## 🤝 Contributing\nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.\n\n- Fork the Project\n- Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n- Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n- Push to the Branch (`git push origin feature/AmazingFeature`)\n- Open a Pull Request\n\n\n## License 📄\nLogSage is MIT licensed. See the [LICENSE](./LICENSE) file for details.\n\n## Support 🆘\nIf you encounter any issues or have questions, please file an issue on GitHub issue tracker.\n\nBuilt with ❤️ by [mutasim](https://www.mutasim.top)\n\nHappy Logging! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmutasim77%2Flogify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmutasim77%2Flogify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmutasim77%2Flogify/lists"}