{"id":22514649,"url":"https://github.com/worktile/rocket-logger","last_synced_at":"2025-08-03T16:31:11.158Z","repository":{"id":28851555,"uuid":"119516251","full_name":"worktile/rocket-logger","owner":"worktile","description":"🚀 rocket-logger","archived":false,"fork":false,"pushed_at":"2023-04-20T07:35:28.000Z","size":196,"stargazers_count":1,"open_issues_count":7,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-17T00:25:53.210Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/worktile.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}},"created_at":"2018-01-30T09:51:14.000Z","updated_at":"2022-01-17T05:39:46.000Z","dependencies_parsed_at":"2022-07-12T23:20:36.891Z","dependency_job_id":null,"html_url":"https://github.com/worktile/rocket-logger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worktile%2Frocket-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worktile%2Frocket-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worktile%2Frocket-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worktile%2Frocket-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/worktile","download_url":"https://codeload.github.com/worktile/rocket-logger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228553242,"owners_count":17935960,"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","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":[],"created_at":"2024-12-07T03:20:04.589Z","updated_at":"2024-12-07T03:20:05.297Z","avatar_url":"https://github.com/worktile.png","language":"JavaScript","readme":"# 🚀 rocket-logger\na sample logger wrapper base on [winston 3.x](https://github.com/winstonjs/winston)\n\n## Features\n\n1. support log to MongoDB;\n1. quickly create owner logger by configuration options;\n\n## Installation\n\n`npm install @worktile/rocket-logger --save`\n\n## Usage\n```\nconst options = {\n    db: {\n        mongodbServer: \"mongodb://localhost:27017/wt-log\",\n        collection: \"\", // default logs\n        errorCollection: \"\", // default errors\n        mongodbOptions: {}, // Mongodb connect options\n    },\n    console: true,\n    file: {\n        filename: \"access.log\",\n        errorFileName: \"error.log\",\n        dirname: \"logs\",\n        maxsize: 1024 * 1024 * 10,\n        maxFiles: 10\n    }\n};\nconst logger = RocketLogger.create(options);\n\nlogger.debug(\"this is debug message\");\nlogger.info(\"this is info message\");\nlogger.warn(\"this is warn message\");\nlogger.error(\"this is error message\");\nlogger.info(\"this is info message\", {\n    action: \"add user\"\n});\n\nlogger.error(\"this is error message\", new Error(\"Custom Error\"));\nlogger.error(new Error(\"Custom Error\"));\nlogger.error(new Error(\"Custom Error\"), {\n    action: \"Get Custom Data\"\n});\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworktile%2Frocket-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworktile%2Frocket-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworktile%2Frocket-logger/lists"}