{"id":21018554,"url":"https://github.com/damartripamungkas/json-activity-log","last_synced_at":"2026-03-06T04:34:51.512Z","repository":{"id":242904878,"uuid":"810949134","full_name":"damartripamungkas/json-activity-log","owner":"damartripamungkas","description":"🖊️ Writes results and logs in json file format","archived":false,"fork":false,"pushed_at":"2024-08-19T11:41:15.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T00:03:22.102Z","etag":null,"topics":["backend","javascript","json","json-activity","json-activity-log","json-log","log-json","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/json-activity-log","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/damartripamungkas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-05T16:49:43.000Z","updated_at":"2024-08-19T11:41:18.000Z","dependencies_parsed_at":"2024-06-05T17:15:57.037Z","dependency_job_id":"3a07fe01-f91e-4252-bbdf-fe6400bc3792","html_url":"https://github.com/damartripamungkas/json-activity-log","commit_stats":null,"previous_names":["damartripamungkas/json-activity-log"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damartripamungkas%2Fjson-activity-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damartripamungkas%2Fjson-activity-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damartripamungkas%2Fjson-activity-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damartripamungkas%2Fjson-activity-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damartripamungkas","download_url":"https://codeload.github.com/damartripamungkas/json-activity-log/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254288207,"owners_count":22045862,"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":["backend","javascript","json","json-activity","json-activity-log","json-log","log-json","nodejs","typescript"],"created_at":"2024-11-19T10:26:32.380Z","updated_at":"2026-03-06T04:34:51.461Z","avatar_url":"https://github.com/damartripamungkas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    JSON-ACTIVITY-LOG\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"GitHub top language\" src=\"https://img.shields.io/github/languages/top/damartripamungkas/json-activity-log?color=04D361\u0026labelColor=000000\"\u003e\n  \n  \u003ca href=\"#\"\u003e\n    \u003cimg alt=\"Made by\" src=\"https://img.shields.io/static/v1?label=made%20by\u0026message=damartripamungkas\u0026color=04D361\u0026labelColor=000000\"\u003e\n  \u003c/a\u003e\n  \n  \u003cimg alt=\"Repository size\" src=\"https://img.shields.io/github/repo-size/damartripamungkas/json-activity-log?color=04D361\u0026labelColor=000000\"\u003e\n  \n  \u003ca href=\"#\"\u003e\n    \u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/damartripamungkas/json-activity-log?color=04D361\u0026labelColor=000000\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n### 📖 Description :\n\nThis package was created for those of you who want a combination of logging and results in JSON style and will be written to a file.\n\n### 💻 Step to install :\n\n```\nnpm install json-activity-log\n```\n\n### ✏️ Example :\n\nsee full [here](./test/test.js)\n\n`code javascript`\n\n```javascript\nconst { join } = require(\"node:path\")\nconst { jsonActivityLog } = require(\"json-activity-log\")\n\nconst test1 = async () =\u003e {\n  const stepAllKey = [`[1] setup_code_expressjs\", \"[2] end`]\n  const [step1, step2] = stepAllKey\n  const pathFileSave = join(__dirname, `test.json`)\n\n  const init = jsonActivityLog(pathFileSave, `run_web_server`, stepAllKey, true)\n  await init.writeLogInfo(step1, `write simple code webserver`)\n  await init.writeResult(step1, { host: `localhost`, port: \"3000\" })\n  await init.writeResult(step2, { status: `success` })\n}\n\nconst test2 = async () =\u003e {\n  const stepAllKey = [`[1] init_telegraf_constructor`, `[2] end`]\n  const [step1, step2] = stepAllKey\n  const pathFileSave = join(__dirname, `test.json`)\n\n  const init = jsonActivityLog(pathFileSave, `run_telegram_bot`, stepAllKey, true)\n  await init.writeLogInfo(step1, `write simple code telegraf initialized`)\n  await init.writeResult(step1, { status: `success` })\n  await init.writeResult(step2, { status: `success` })\n}\n\nconst run = async () =\u003e {\n  await test1()\n  await test2()\n}\n\nrun()\n```\n\n`result in json file`\n\n```json\n{\n  \"run_web_server\": {\n    \"[1] setup_code_expressjs\": {\n      \"result\": {\n        \"host\": \"localhost\",\n        \"port\": \"3000\"\n      },\n      \"log\": {\n        \"[2024-06-05 23:40:42:513] [INFO]\": \"write simple code webserver\"\n      }\n    },\n    \"[2] end\": {\n      \"result\": {\n        \"status\": \"success\"\n      },\n      \"log\": {}\n    }\n  },\n  \"run_telegram_bot\": {\n    \"[1] init_telegraf_constructor\": {\n      \"result\": {\n        \"status\": \"success\"\n      },\n      \"log\": {\n        \"[2024-06-05 23:40:42:537] [INFO]\": \"write simple code telegraf initialized\"\n      }\n    },\n    \"[2] end\": {\n      \"result\": {\n        \"status\": \"success\"\n      },\n      \"log\": {}\n    }\n  }\n}\n```\n\n### 🧾 Pre-Requisistes :\n\n```\nnode.js\n```\n\n### 📝 License :\n\nLicensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamartripamungkas%2Fjson-activity-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamartripamungkas%2Fjson-activity-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamartripamungkas%2Fjson-activity-log/lists"}