Download the PHP package magify/magento2-module-slacknotifier without Composer
On this page you can find all versions of the php package magify/magento2-module-slacknotifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download magify/magento2-module-slacknotifier
More information about magify/magento2-module-slacknotifier
Files in magify/magento2-module-slacknotifier
Package magento2-module-slacknotifier
Short Description This Magento 2 module automatically sends every logger exception to a specified Slack channel.
License MIT
Informations about the package magento2-module-slacknotifier
Magento 2 Slack Notifier Module
Overview
The Magento 2 Slack Notifier module sends logger exceptions automatically to a specified Slack channel. This integration helps you stay updated with critical issues in your Magento store by sending real-time notifications directly to your Slack workspace.
Features
- Sends logger exceptions to a Slack channel
- Configurable log levels (Alert, Debug, Critical, Info, Error, Emergency, Notice, Warning)
- Option to use synchronous or asynchronous sending
- Custom message service to send messages to specified channels with async/sync options (for developers)
Installation
Using Composer
- Navigate to your Magento 2 root directory.
-
Require the module using Composer:
-
Enable the module:
- Run the setup upgrade command:
Configuration
- In the Magento admin panel, navigate to
Stores > Configuration > Advanced > Developer > Slack Notifier
. -
Configure the following settings:
- Activate: Enable or disable the Slack notifier module.
- Use Async Send: Select whether to send messages asynchronously or synchronously.
- API Timeout: Set the timeout duration in seconds for API calls. Use 0 for an indefinite wait.
- Logger Type: Select the log types to send to Slack (e.g., Alert, Debug, Critical, etc.).
- URL: The Slack API URL. Typically, this will be
https://slack.com/api/chat.postMessage
. - Channel ID: The ID of the Slack channel where messages will be sent.
- Token: Your Slack app token.
Usage
Once configured, the module will automatically send log exceptions of the specified types to your Slack channel. You can monitor these notifications to quickly respond to issues in your Magento store.
Custom Message Service
Overview
The custom message service allows developers to send any message to a specified Slack channel, with the option to choose between asynchronous or synchronous sending.
Note
If the channel and token are not set in the function parameters, the service will use the values configured in the Magento admin panel.
Usage
Here is an example of how to use the custom message service in your Magento 2 module:
-
Inject the
CustomMessage
in your class: - Call the
notifyMessage
method with your title, message, channel ID, token and sending type (async/sync).
Support
For support and feature requests, please open an issue on the GitHub repository.
License
This module is licensed under the MIT License.
All versions of magento2-module-slacknotifier with dependencies
magento/framework Version 103.0.*
magento/module-customer Version 103.0.*
magento/module-store Version 101.1.*