apextoolbox / laravel-logger
Apex Toolbox Laravel Logger
Installs: 665
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/apextoolbox/laravel-logger
Requires
- php: >=8.1
- illuminate/http: ^10 || ^11 || ^12
- illuminate/log: ^10 || ^11 || ^12
- illuminate/support: ^10 || ^11 || ^12
Requires (Dev)
- mockery/mockery: ^1.6.12@stable
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^10.0
README
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/logger.php
'path_filters' => [
'include' => ['*'],
'exclude' => ['_debugbar/*', 'telescope/*', 'api/health'],
],
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