# @softonic/axios-logger

> Axios plugin to log all requests and responses

Latest version **1.1.3** (published 2017-08-22) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @softonic/axios-logger
pnpm add @softonic/axios-logger
yarn add @softonic/axios-logger
bun add @softonic/axios-logger
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2017-08-22 |
| First published | 2017-03-14 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Rubén Norte |
| Maintainers | softonic |
| Keywords | axios, plugin, log, request, response, http |

## Links

- npm: https://www.npmjs.com/package/@softonic/axios-logger
- Repository: https://github.com/softonic/axios-logger
- Issues: https://github.com/softonic/axios-logger/issues
- npm.io page: https://npm.io/package/@softonic/axios-logger

## Dependencies (1)

- [@softonic/http-log-format](https://npm.io/package/@softonic/http-log-format.md) ^1.1.2

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.1.3 (latest) — 2017-08-22
- 1.1.2 — 2017-06-20
- 1.1.1 — 2017-06-15
- 1.1.0 — 2017-03-17
- 1.0.2 — 2017-03-15
- 1.0.1 — 2017-03-14
- 1.0.0 — 2017-03-14

## README

# @softonic/axios-logger

Axios plugin to log all requests and responses

## Installation

```bash
npm install @softonic/axios-logger
```

## Usage

```js
// 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:

```bash
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`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

---
_Source: https://npm.io/package/@softonic/axios-logger · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
