# @erkelost/axios-ext-log

> Log plugin for AxiosExt.

Latest version **1.0.5** (published 2022-05-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @erkelost/axios-ext-log
pnpm add @erkelost/axios-ext-log
yarn add @erkelost/axios-ext-log
bun add @erkelost/axios-ext-log
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-05-02 |
| First published | 2022-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | leihaohao |
| Maintainers | erkelost |
| Keywords | axios, axios-extension, axios-ext, axios-ext-log, log |

## Links

- npm: https://www.npmjs.com/package/@erkelost/axios-ext-log
- Repository: https://github.com/iel-h/axios-ext
- Issues: https://github.com/iel-h/axios-ext/issues
- npm.io page: https://npm.io/package/@erkelost/axios-ext-log

## Dependencies (1)

- [@iel/axios-ext-utils](https://npm.io/package/@iel/axios-ext-utils.md) ^1.0.5

## 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.0.5 (latest) — 2022-05-02

## README

# `@iel/axios-ext-log`

> 为 `Axios` 扩展阶段输出信息功能。

## 安装

```bash
# 依赖 @iel/axios-ext
npm i @iel/axios-ext @iel/axios-ext-log -S
```

## 用法

```js
import { createAxios } from '@iel/axios-ext'
import AxiosExtLogPlugin from '@iel/axios-ext-log'
import axios from 'axios'

const http = createAxios(axios)

http.$axiosExt.use(AxiosExtLogPlugin, {
  // 所有接口响应后输出信息
  globalOnResponse: true
})

http.get('/demo/list').then((res) => {
  console.log(res)
})

// 单独在请求时输出请求配置
http
  .withLog({ onRequest: true })
  .get('/demo/list')
  .then((res) => {
    console.log(res)
  })
```

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