Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
axios-debug-log
Advanced tools
Axios interceptor of logging requests & responses by debug.
$ npm install --save axios axios-debug-log
- Install: add
require('axios-debug-log')
before any axios execution.- Enable: set
DEBUG=axios
environment variables before start your fantastic Node.js application.
Or
Add
require('axios-debug-log/enable')
before any axios execution to install and enable.
Or
Run DEBUG=axios node --require axios-debug-log [entrypoint.js]
Or
Run node --require axios-debug-log/enable [entrypoint.js]
- Install: add
require('axios-debug-log')
before any axios execution.- Enable: set
localStorage.debug = "axios"
before start your fantastic web application.
Or
Add
require('axios-debug-log/enable')
before any axios execution to install and enable.
Please read README of debug for usage details.
// Log content type
require('axios-debug-log')({
request: function (debug, config) {
debug('Request with ' + config.headers['content-type'])
},
response: function (debug, response) {
debug(
'Response with ' + response.headers['content-type'],
'from ' + response.config.url
)
},
error: function (debug, error) {
// Read https://www.npmjs.com/package/axios#handling-errors for more info
debug('Boom', error)
}
})
Use require('axios-debug-log').addLogger(instance, debug)
to add custom debug
logger to custom instance.
var github = axios.create({ baseURL: 'https://api.github.com/' })
var githubLogger = require('debug')('github')
require('axios-debug-log').addLogger(github, githubLogger)
github('/user')
And Yours...
MIT
FAQs
Axios interceptor of logging requests & responses by debug.
The npm package axios-debug-log receives a total of 28,640 weekly downloads. As such, axios-debug-log popularity was classified as popular.
We found that axios-debug-log demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.