Axios interceptor that logs HTTP request and response details using the debug library. Version 1.0.0 supports axios >= 1.0.0, ships TypeScript types, and works in both Node.js and browser environments. The main entry sets up interception and activates logging when the DEBUG environment variable is set to 'axios'. An alternative entry ('axios-debug-log/enable') activates logging immediately without requiring environment variables. Compared to other logging interceptors, it leverages the popular debug library for namespaced, toggleable output and minimal overhead.
npm install axios-debug-logNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows side-effect import to enable debug logging for all axios requests/responses, using ENV var or enable subpath.
Set environment variable DEBUG=axios before running your app, or use import 'axios-debug-log/enable' to activate logging immediately.
Use addLogger(instance, debugLogger) to attach logging to specific axios instances.
Import with: import 'axios-debug-log/enable' (not import { enable } from ...)Ensure you are using a module bundler or Node.js version that supports package.json 'exports'. Alternatively, use the main entry: require('axios-debug-log') and set DEBUG env var.Use named import: import { addLogger } from 'axios-debug-log'.