1.0.8 • Published 3 years ago

@knivesq/p-logger v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Welcome to p-logger! Your preferred Axios Logger!

The purpose of this library is to easily read response and request logs with a cool collapsed feature where you can see the response data, configs, headers and what not.

Installation

You can either:

yarn add @knivesq/p-logger --dev 

or

npm install @knivesq/p-logger --save-dev 

Usage

import { logError, logSuccess } from "@knivesq/p-logger";

// axios interceptors for success response and error
axios.interceptors.response.use(logSuccess, logError);

// or add multiple apis from axios.create
[api, api2, api3].map((api) => {
   api.interceptors.response.use(logSuccess, logError);
   return api;
});

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago