1.1.3 • Published 7 years ago

@softonic/axios-logger v1.1.3

Weekly downloads
280
License
Apache-2.0
Repository
github
Last release
7 years ago

@softonic/axios-logger

Axios plugin to log all requests and responses

Installation

npm install @softonic/axios-logger

Usage

// CommonJS
// const axiosLogger = require('@softonic/axios-logger');

// ES2015
import axiosLogger from '@softonic/axios-logger';

axiosLogger(axiosInstance, {
  logger: bunyan.createLogger({ name: "myapp" }),
  // whitelistHeaders and blacklistHeaders should not be used together
  whitelistRequestHeaders: [ 'host', 'accept' ],
  whitelistResponseHeaders: [ 'content-type' ],
  blacklistRequestHeaders: [ 'authorization', 'cookie' ],
  blacklistResponseHeaders: [ 'set-cookie' ],
});

Testing

Clone the repository and execute:

npm test

Contribute

  1. Fork it: git clone https://github.com/softonic/@softonic/axios-logger.git
  2. Create your feature branch: git checkout -b feature/my-new-feature
  3. Commit your changes: git commit -am 'Added some feature'
  4. Check the build: npm run build
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request :D
1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago