Download the PHP package diginov/craft-sentry-logger without Composer

On this page you can find all versions of the php package diginov/craft-sentry-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-sentry-logger

Sentry Logger for Craft CMS

Pushes Craft CMS logs to Sentry through a real Yii 2 log target.

Features

Additional data pushed to Sentry

Requirements

This plugin requires PHP 8.2 or later and Craft CMS 5.0 or later.

Installation

To install this plugin, search for Sentry Logger on the Craft Plugin Store and click Install or run the following terminal commands in your Craft project folder to install it with Composer:

Basic configuration

You can configure the plugin settings directly in the CP or you can create a config/sentry-logger.php config file with the following contents. Make sure to update your .env environment file accordingly with the correct values.

Advanced configuration

This is a better method because it adds this Sentry log target to the existing log component before loading any Craft plugins or modules. This way you are assured that all logs are sent to Sentry.

Please note that this method override the basic configuration method.

To activate the advanced configuration, extend the log component in your existing config/app.php config file:

Configuration parameters

This plugin adds a native Yii 2 log target that is an instance of the yii\log\Target class. See the Yii 2 API Documentation for all available properties.

enabled

This required parameter is a boolean that indicates whether this log target is enabled.

anonymous

This optional parameter is a boolean that indicates, when enabled, that this log target will NOT send sensitive visitors and users data to Sentry.

userPrivacy

This optional parameter is an array of sensitive user data that will be sent to Sentry if the anonymous parameter is set to false. Available values are id, email, username, ip_address, cookies and permissions. Defaults to all sensitive user data.

dsn

This required parameter is a string that contain the Client Key (DSN) that Sentry gave you in your project settings.

release

This optional parameter is a string that contain the version of your application that is deployed to an environment. See more information about releases in Sentry documentation.

environment

This optional parameter is a string that contain the environment tag that designate where your application is deployed. Defaults to CRAFT_ENVIRONMENT. See more information about environment in Sentry documentation.

options

This optional parameter is an array of client options that will be passed to the Sentry SDK when it initializes. See more information about available options in Sentry documentation.

levels

This required parameter is an array of log level names that this log target is interested in. Defaults to error and warning. We have intentionally disabled reporting info, profile and debug log levels to Sentry because Craft generates a lot of messages for these log levels.

categories

This optional parameter is an array of message categories that this log target is interested in. Defaults to empty, meaning all categories. You can use an asterisk at the end of a category so that the category may be used to match those categories sharing the same common prefix. For example, yii\db* will match categories starting with yii\db\, such as yii\db\Connection.

except

This optional parameter is an array of message categories that this log target is NOT interested in. Defaults to empty, meaning no uninteresting categories. If this property is not empty, then any category listed here will be excluded from the categories parameter. You can use an asterisk at the end of a category so that the category can be used to match those categories sharing the same common prefix. For example, yii\db* will match categories starting with yii\db\, such as yii\db\Connection.

exceptCodes

This optional parameter is an array of HTTP status codes that this log target is NOT interested in. This is a shortcut for the except parameter to make it easier. Defaults to 403 and 404, meaning that yii\web\HttpException:403 and yii\web\HttpException:404 categories will be excluded from the categories parameter.

exceptPatterns

This optional parameter is an array of text search patterns that this log target is NOT interested in. Defaults to empty, meaning no uninteresting text search patterns. These text search patterns are matched on the text of an exception message, error or warning. This is useful for filtering out text messages sent without an exception code such as those sent by the Craft::error() and Craft::warning() methods.

Credits

Inspired by the olegtsvetkov/yii2-sentry package and by official sentry/sentry-symfony and sentry/sentry-laravel packages.


All versions of craft-sentry-logger with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^5.0.0
sentry/sentry Version ^4.7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package diginov/craft-sentry-logger contains the following files

Loading the files please wait ....