{"id":13492889,"url":"https://github.com/Gerhut/axios-debug-log","last_synced_at":"2025-03-28T11:30:59.308Z","repository":{"id":16820019,"uuid":"80687038","full_name":"Gerhut/axios-debug-log","owner":"Gerhut","description":"Axios interceptor of logging request \u0026 response with debug library.","archived":false,"fork":false,"pushed_at":"2024-10-01T04:22:44.000Z","size":95,"stargazers_count":133,"open_issues_count":2,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T22:35:35.189Z","etag":null,"topics":["axios","debug","logging"],"latest_commit_sha":null,"homepage":"https://npm.im/axios-debug-log","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gerhut.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":"2017-02-02T02:42:48.000Z","updated_at":"2024-08-01T05:04:17.000Z","dependencies_parsed_at":"2024-05-01T05:38:12.375Z","dependency_job_id":"1035180d-f54a-435a-a914-777bd2af1c84","html_url":"https://github.com/Gerhut/axios-debug-log","commit_stats":{"total_commits":117,"total_committers":8,"mean_commits":14.625,"dds":0.3846153846153846,"last_synced_commit":"8e66fe6d14a3e9400262135a6892920882678669"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gerhut%2Faxios-debug-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gerhut%2Faxios-debug-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gerhut%2Faxios-debug-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gerhut%2Faxios-debug-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gerhut","download_url":"https://codeload.github.com/Gerhut/axios-debug-log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245370000,"owners_count":20604191,"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":["axios","debug","logging"],"created_at":"2024-07-31T19:01:10.208Z","updated_at":"2025-03-28T11:30:59.070Z","avatar_url":"https://github.com/Gerhut.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Inspired by"],"sub_categories":["Custom filename"],"readme":"# axios-debug-log\n\n[![Node.js CI](https://github.com/Gerhut/axios-debug-log/actions/workflows/ci.yaml/badge.svg)](https://github.com/Gerhut/axios-debug-log/actions/workflows/ci.yaml)\n[![Coverage Status](https://coveralls.io/repos/github/Gerhut/axios-debug-log/badge.svg?branch=master)](https://coveralls.io/github/Gerhut/axios-debug-log?branch=master)\n[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n\n[Axios](https://www.npmjs.com/package/axios) interceptor of logging requests \u0026amp; responses by [debug](https://www.npmjs.com/package/debug).\n\n![Screenshot](screenshot.png \"Screenshot\")\n\n## Install\n\n    $ npm install --save axios axios-debug-log\n\n## Node.js usage\n\n\u003e 1. Install: add `require('axios-debug-log')` before any axios execution.\n\u003e 2. Enable: set `DEBUG=axios` environment variables before start your fantastic Node.js application.\n\nOr\n\n\u003e Add `require('axios-debug-log/enable')` before any axios execution\n\u003e to install and enable.\n\nOr\n\n\u003e Run DEBUG=axios node --require axios-debug-log \\[entrypoint.js\\]\n\nOr\n\n\u003e Run node --require axios-debug-log/enable \\[entrypoint.js\\]\n\nOR\n\u003e 1. Install: add when using ES modules (type: module) before any axios execution.\n\u003e ```js\n\u003e import { createRequire } from 'module';\n\u003e const require = createRequire(import.meta.url);\n\u003e require('axios-debug-log');\n\u003e const axios = require('axios');\n\u003e ```\n\u003e 2.  Enable: set `DEBUG=axios` environment variables before start your fantastic Node.js application.\n\n## Browser usage\n\n\u003e 1. Install: add `require('axios-debug-log')` before any axios execution.\n\u003e 2. Enable: set `localStorage.debug = \"axios\"` before start your fantastic web application.\n\nOr\n\n\u003e Add `require('axios-debug-log/enable')` before any axios execution\n\u003e to install and enable.\n\nPlease read [README of debug](https://github.com/visionmedia/debug#readme) for usage details.\n\n## Configuration\n\n```javascript\n// Log content type\nrequire('axios-debug-log')({\n  request: function (debug, config) {\n    debug('Request with ' + config.headers['content-type'])\n  },\n  response: function (debug, response) {\n    debug(\n      'Response with ' + response.headers['content-type'],\n      'from ' + response.config.url\n    )\n  },\n  error: function (debug, error) {\n    // Read https://www.npmjs.com/package/axios#handling-errors for more info\n    debug('Boom', error)\n  }\n})\n```\n\n## Customization\n\nUse `require('axios-debug-log').addLogger(instance, debug)` to add custom debug\nlogger to custom instance.\n\n```javascript\nvar github = axios.create({ baseURL: 'https://api.github.com/' })\nvar githubLogger = require('debug')('github')\nrequire('axios-debug-log').addLogger(github, githubLogger)\ngithub('/user')\n```\n\n## Trust by\n\n[![octokit](https://avatars2.githubusercontent.com/u/3430433?s=200)](https://github.com/octokit)\n[![SlackAPI](https://avatars3.githubusercontent.com/u/6962987?s=200)](https://github.com/slackapi)\n[![Center for Public Integrity](https://avatars3.githubusercontent.com/u/459758?s=200)](https://github.com/PublicI)\n[![AppImage](https://avatars0.githubusercontent.com/u/16617932?s=200)](https://github.com/AppImage)\n[![pytorch](https://avatars0.githubusercontent.com/u/21003710?s=200)](https://github.com/pytorch)\n\n*And Yours...*\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGerhut%2Faxios-debug-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGerhut%2Faxios-debug-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGerhut%2Faxios-debug-log/lists"}