Download the PHP package justbetter/laravel-error-logger without Composer

On this page you can find all versions of the php package justbetter/laravel-error-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 laravel-error-logger

Laravel Error Logger

This packages contains a nice and easy way to log errors that happen in your application. A job can be added to your scheduler in order to receive daily notifications about reported errors via e.g. Slack.

Support for Laravel Nova is also available to view a list of reported errors with the justbetter/nova-error-logger package.

Please note that this package won't automatically save exceptions thrown by Laravel or PHP - you have to manually save them like the example shown later in this documentation.

Setup

In order to make use of the package the following actions are required.

Publishing

Publish the configuration of the package.

Migrations

Run your migrations.

Scheduler

NOTE! This is optional and not required in order to use the package.

In your App\Console\Kernel.php you can add the daily error notification job like so:

Configuration

Add the following variable to your .env to define the logging channel for daily notifications if the job is enabled.

Commands

The logging table can build up pretty fast. In order to prune older records, you can use the following command:

To automatically prune the logs, you may want to add the command to your scheduler.

Example usage

IMPORTANT! When using the method withChannel it will directly send a notification when saved.

The error class can be easily used. No value is required to be set in order to save the log.

Method FromThrowable

You may also use the method fromThrowable. This function accepts a Throwable which automatically sets the following extra attributes compared to withThrowable:

It is still possible to override these values when chaining them after the throwable.

Grouping

Errors will be automatically grouped. In the config you can set an interval for this. If you don't want to group you can call dontGroup().

Hiding from index

You can hide errors from the index by calling hideFromIndex().

Model relation

When using the withModel method you can retrieve errors for a specific model. The \JustBetter\ErrorLogger\Traits\HasErrors trait contains this relation with the name errors()

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-error-logger with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
laravel/framework Version ^11.0|^12.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 justbetter/laravel-error-logger contains the following files

Loading the files please wait ....