Skip to content

Automatically capture and record the API calls made to your Strapi (v5) application

License

Notifications You must be signed in to change notification settings

BayBreezy/strapi-plugin-logz

Repository files navigation

Strapi Plugin Logz

Automatically capture and record the API calls made to your Strapi application

Screenshot of an imported design

💸 Support Me

If you can 😊

Buy Me A Coffee

⚙️ 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.

Admin Area

Content Manager Area

📝 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);

About

Automatically capture and record the API calls made to your Strapi (v5) application

Topics

Resources

License

Stars

Watchers

Forks