strapi-plugin-logz
v0.0.10
Published
Automatically capture and record the API calls made to your Strapi application
Downloads
265
Readme
Strapi Plugin Logz
Automatically capture and record the API calls made to your Strapi application
💸 Support Me
If you can 😊
⚙️ Version
This plugin is compatible with Strapi v5.
💻 Prerequisites
- Node v18+ (I recommend using nvm, there is a windows and mac/linux version)
- A Strapi v5 project (
npx create-strapi-app@latest my-project
)
⬇️ Installation
Install the plugin by running the following command:
npm install strapi-plugin-logz
🎚️ Plugin Configuration
The plugin configuration accepts a single skipList
property.
This is the type definition for the configuration:
/**
* Configuration for the Logz Strapi plugin
*/
export interface LogzConfig {
/**
* Enter the list of collections to skip creating logs for
*
* @default []
*
* @example
* ```ts
* // config/plugins.ts
*export default ({ env }) => ({
* // ...
* logz: {
* enabled: true,
* config: {
* // This will skip creating logs for the collection "car"
* // All requests sent to /api/cars will not be logged
* skipList: ["car"],
* },
* },
* // ...
*});
*/
skipList: Array<string>;
}
▶️ Usage
After installing, you can access the Logz Dashboard by navigating to the Logz
section in the admin panel.
📝 License
This project is licensed under the MIT License - see the LICENSE file for details
🚀 Services
Find
await strapi.plugin("logz").service("logz").find(QUERY_PARAMS_OBJECT);
FindOne
await strapi.plugin("logz").service("logz").findOne(ID, QUERY_PARAMS_OBJECT);
Count
await strapi.plugin("logz").service("logz").count(QUERY_PARAMS_OBJECT);