Download the PHP package amirkateb/laralogger without Composer

On this page you can find all versions of the php package amirkateb/laralogger. 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 laralogger

Laralogger

GitHub Release GitHub License

Laralogger is a powerful, queue-ready Laravel error logging package that automatically captures HTTP 4xx/5xx errors and system-level issues, logs them to the database, sends customizable notifications (Telegram, Email), and even analyzes them using AI (GPT).

πŸ“„ Ω…Ψ·Ψ§Ω„ΨΉΩ‡ Ψ―Ψ§Ϊ©ΫŒΩˆΩ…Ω†Ψͺ فارسی


πŸš€ Features


πŸ“¦ Installation


βš™οΈ Configuration

Edit your config/laralogger.php to set:

You can also define a custom notification class via:


πŸ“£ Notification System

Laralogger supports sending error notifications via multiple channels such as Telegram, email, or custom handlers. Notifications are triggered after each error is logged.

πŸ”§ Configuration

In config/laralogger.php, define the channels and options:

🧩 Built-in Notifiers

You can add your own class implementing Laralogger\Contracts\NotifiableInterface and plug it into the configuration.

πŸ§ͺ Example

All notifiers support queue-based delivery if enabled.

πŸ€– AI-Powered Error Analysis

Laralogger provides optional support for AI-driven error diagnostics using OpenAI (e.g. GPT-4 or GPT-3.5). When enabled, it automatically sends a summarized error context to the selected model and stores the response (suggested cause/fix) in your database.

πŸ”§ Enable AI Analysis

In config/laralogger.php, update the ai section:

Then, set the environment variable:

☝️ The prompt supports {{error}} as a placeholder that will be replaced with error details automatically.

πŸ“¦ Output

πŸ§ͺ Example

Run this to test:

Check your database β€” you should see an AI-generated explanation added to the test log entry.

πŸ§ͺ Artisan Commands


πŸ—ƒοΈ Log Storage Structure

Laralogger stores all error logs in the database using the error_logs table. Each record includes detailed information about the exception, request, user, environment, and optional AI analysis.

πŸ“„ Schema Overview

By default, Laralogger creates the following columns in the error_logs table:

Column Description
id Primary key
message Exception message
status_code HTTP status code (e.g., 404, 500)
exception_class Class name of the exception
file File path where exception occurred
line Line number
url Request URL
method HTTP method (GET, POST...)
user_id ID of authenticated user (nullable)
user_type Guarded class (e.g., App\Models\User)
headers Full request headers (JSON)
payload Request body (JSON)
ip Request IP address
user_agent User’s browser/device info
ai_analysis Optional AI-generated explanation
created_at Timestamp of the error

πŸ“ Migration

To publish and run the migration:

You can customize the migration to add extra columns if needed.

🧾 Log Schema

Each log entry contains:


πŸ“› Real-time Nginx Log Scanner

Laralogger can optionally monitor your Nginx error logs in real-time to catch server-level issues such as 502 Bad Gateway or 504 Gateway Timeout, even before they reach Laravel.

πŸ”§ Configuration

In config/laralogger.php:

βš™οΈ How It Works

πŸ§ͺ Example Command

You may use this inside a scheduled task or create a background service like:

You can extend this to monitor multiple log files as well.

πŸ” Webhook Logging and Route Monitoring

Laralogger also supports optional logging of non-error HTTP requests such as:

This allows you to analyze traffic patterns, API behavior, or debug critical routes.

πŸ”§ Configuration

πŸ—‚οΈ Where Are They Logged?

These logs are stored in the same error_logs table, with a status_code like 200, 302, etc. They are marked with a non_exception flag internally to differentiate.

πŸ“Š Use Cases


πŸ“„ License

MIT Β© 2025 AmirMohammad KatebSaber


All versions of laralogger with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
illuminate/support Version ^10.0 || ^11.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 amirkateb/laralogger contains the following files

Loading the files please wait ...