{"id":22341367,"url":"https://github.com/0xrasla/logify","last_synced_at":"2025-10-14T18:31:11.515Z","repository":{"id":266233053,"uuid":"897777125","full_name":"0xrasla/logify","owner":"0xrasla","description":"An easy to use logger for elysia js.","archived":false,"fork":false,"pushed_at":"2025-09-20T14:59:41.000Z","size":172,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-21T04:44:59.458Z","etag":null,"topics":["bun","bunjs","elysiajs","logger","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@rasla/logify","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/0xrasla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-12-03T08:15:48.000Z","updated_at":"2025-09-20T22:22:06.000Z","dependencies_parsed_at":"2024-12-03T09:33:29.195Z","dependency_job_id":null,"html_url":"https://github.com/0xrasla/logify","commit_stats":null,"previous_names":["0xrasla/elysia-easy-logger","0xrasla/logify"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/0xrasla/logify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xrasla%2Flogify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xrasla%2Flogify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xrasla%2Flogify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xrasla%2Flogify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xrasla","download_url":"https://codeload.github.com/0xrasla/logify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xrasla%2Flogify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020355,"owners_count":26086866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bun","bunjs","elysiajs","logger","typescript"],"created_at":"2024-12-04T08:06:36.164Z","updated_at":"2025-10-14T18:31:11.510Z","avatar_url":"https://github.com/0xrasla.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logify\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA beautiful, fast, and type-safe logging middleware for Node.js web applications. Get instant insights into your HTTP requests with colorized console output and structured file logging.\n\n## 📦 Packages\n\nThis monorepo contains the following packages:\n\n- [@rasla/logify](./packages/elysia-js) - Logging middleware for Elysia.js\n- [@rasla/express-logify](./packages/express) - Logging middleware for Express.js\n\n## ✨ Features\n\n- 🎨 Beautiful console output with color-coded log levels\n- ⚡ Zero-config with smart defaults\n- 📊 Request duration and status code tracking\n- 🌐 IP address logging with proxy support\n- 📝 Structured logging with TypeScript support\n- 🎯 Path-based request filtering\n- 🔄 Automatic log directory creation\n- 🎛️ Fully customizable log formats\n- 🌍 Global logger instance for application-wide logging\n- 📝 Convenient logging functions: debug(), info(), warn(), and error()\n\n## 📥 Installation\n\nChoose the package that matches your framework:\n\n### For Elysia.js\n\n```bash\nbun add @rasla/logify\n```\n\n### For Express.js\n\n```bash\nnpm install @rasla/express-logify\n# or\nyarn add @rasla/express-logify\n# or\npnpm add @rasla/express-logify\n```\n\n## 🚀 Quick Start\n\n### Elysia.js\n\n```typescript\nimport { Elysia } from \"elysia\";\nimport { logger } from \"@rasla/logify\";\n\nconst app = new Elysia()\n  .use(logger())\n  .get(\"/\", () =\u003e \"Hello World!\")\n  .listen(3000);\n```\n\n### Express.js\n\n```typescript\nimport express from \"express\";\nimport { logger } from \"@rasla/express-logify\";\n\nconst app = express();\n\napp.use(logger());\napp.get(\"/\", (req, res) =\u003e res.send(\"Hello World!\"));\n\napp.listen(3000);\n```\n\n## 🌍 Global Logger\n\nBoth packages now include a global logger that can be accessed from anywhere in your application:\n\n````typescript\n// Elysia.js\nimport {\n  initializeLogger,\n  debug,\n  info,\n  warn,\n  error\n} from \"@rasla/logify\";\n\n// Express.js\nimport {\n  initializeLogger,\n  debug,\n  info,\n  warn,\n  error\n} from \"@rasla/express-logify\";\n\n// Configure once at startup\ninitializeLogger({\n  level: \"debug\",\n  file: true,\n  filePath: \"./logs/app.log\"\n});\n\n// Use anywhere in your code\ndebug(\"This is a debug message\");\ninfo(\"This is an info message\");\nwarn(\"This is a warning message\");\nerror(\"This is an error message\");\n| `{statusCode}` | HTTP status | `200`, `404` |\n| `{duration}` | Request time | `123ms` |\n| `{ip}` | Client IP | `127.0.0.1` |\n````\n\n## 🎯 Examples\n\nCheck out the examples in each package:\n- [Elysia.js Examples](./packages/elysia-js/examples)\n- [Express.js Examples](./packages/express/examples)\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 🎨 Configuration\n\nBoth packages support the same configuration options:\n\n```typescript\n{\n  // Console logging (default: true)\n  console: true,\n\n  // File logging (default: false)\n  file: true,\n  filePath: './logs/app.log',\n\n  // Log level (default: \"info\")\n  level: 'debug', // \"debug\" | \"info\" | \"warn\" | \"error\"\n\n  // Skip certain paths\n  skip: ['/health', '/metrics'],\n\n  // Include IP address (default: false)\n  includeIp: true,\n\n  // Custom format (see Format Tokens below)\n  format: '[{timestamp}] {level} [{method}] {path} - {statusCode} {duration}ms{ip}',\n}\n````\n\n## 📝 Format Tokens\n\nCustomize your log format using these tokens:\n\n| Token          | Description   | Example                    |\n| -------------- | ------------- | -------------------------- |\n| `{timestamp}`  | ISO timestamp | `2024-12-03T17:48:54.721Z` |\n| `{level}`      | Log level     | `INFO`, `ERROR`            |\n| `{method}`     | HTTP method   | `GET`, `POST`              |\n| `{path}`       | Request path  | `/api/users`               |\n| `{statusCode}` | HTTP status   | `200`, `404`               |\n| `{duration}`   | Request time  | `123ms`                    |\n| `{ip}`         | Client IP     | `127.0.0.1`                |\n\n## 🎯 Examples\n\nCheck out the examples in each package:\n\n- [Elysia.js Examples](./packages/elysia-js/examples)\n- [Express.js Examples](./packages/express/examples)\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📄 License\n\nMIT License - Created by [0xRasla](https://github.com/0xRasla)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xrasla%2Flogify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xrasla%2Flogify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xrasla%2Flogify/lists"}