apextoolbox/laravel-logger

Apex Toolbox Laravel Logger

Maintainers

Package info

github.com/apextoolbox/laravel-logger

pkg:composer/apextoolbox/laravel-logger

Statistics

Installs: 773

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

0.3.0 2026-03-07 07:15 UTC

This package is auto-updated.

Last update: 2026-03-12 11:45:40 UTC


README

PHP Version Laravel

Automatic error tracking, logging, and performance monitoring for Laravel applications.

Installation

composer require apextoolbox/laravel-logger

Add to .env:

APEX_TOOLBOX_ENABLED=true
APEX_TOOLBOX_TOKEN=your_token_here

Add the log channel to config/logging.php:

'channels' => [
    // ... other channels
    
    'apextoolbox' => [
        'driver' => 'monolog',
        'handler' => \ApexToolbox\Logger\Handlers\ApexToolboxLogHandler::class,
        'level' => 'debug',
    ],
],

Update .env to include the channel in your log stack:

LOG_STACK=daily,apextoolbox

Add the middleware for HTTP request tracking (optional):

// bootstrap/app.php (Laravel 11+)
->withMiddleware(function (Middleware $middleware) {
    $middleware->append(\ApexToolbox\Logger\Middleware\LoggerMiddleware::class);
})

// Or app/Http/Kernel.php (Laravel 10)
protected $middleware = [
    \ApexToolbox\Logger\Middleware\LoggerMiddleware::class,
];

Done! The SDK automatically captures exceptions, logs, and database queries.

Configuration

Publish the config file for customization:

php artisan vendor:publish --tag=logger-config

Environment Variables

Variable Description Default
APEX_TOOLBOX_TOKEN Your project token Required
APEX_TOOLBOX_ENABLED Enable/disable tracking true

Path Filtering

// config/apextoolbox.php
'path_filters' => [
    'include' => ['*'],
    'exclude' => ['_debugbar/*', 'telescope/*', 'horizon/*', 'api/health', 'api/ping'],
],

Sensitive Data

Sensitive fields like password, token, authorization are automatically excluded from logs.

Requirements

  • PHP 8.1+
  • Laravel 10.x, 11.x, or 12.x

License

MIT