fadyandrawes / siteguard-logger
Logger for Siteguard integration
Requires
- php: ^8.3
- illuminate/support: ^12.0||^13.0
Requires (Dev)
- larastan/larastan: ^3.9
- laravel/pao: ^1.0
- laravel/pint: ^1.29
- orchestra/testbench: ^10.0||^11.0
- pestphp/pest: ^4.6
- pestphp/pest-plugin-laravel: ^4.1
- pestphp/pest-plugin-type-coverage: ^4.0
- phpstan/extension-installer: ^1.4
This package is auto-updated.
Last update: 2026-07-30 18:47:47 UTC
README
Siteguard Logger
Logger for Siteguard integration
Installation
You can install the package via Composer:
composer require fadyandrawes/siteguard-logger
You may publish all of the package's resources at once:
php artisan vendor:publish --tag="siteguard-logger"
Or, you may publish each resource individually:
Publishing the Configuration File
php artisan vendor:publish --tag="siteguard-logger-config"
Usage
The package registers a siteguard log channel that ships log records to your
Siteguard API endpoint. Configure it through environment variables:
SITEGUARD_API_KEY=your-secret-api-key SITEGUARD_ENDPOINT=https://your-siteguard-instance.test/api/logs SITEGUARD_LEVEL=debug
Send logs to the channel explicitly:
use Illuminate\Support\Facades\Log; Log::channel('siteguard')->info('User signed in', ['user' => 42]);
Or make it the default channel by setting LOG_CHANNEL=siteguard in your
application's .env, after which Log::info(...), Laravel's exception
handler, and all framework logging will flow to Siteguard.
The handler ships records asynchronously with a short timeout and silently falls back to
error_log()if the API is unreachable, so logging never breaks your application.
Contributing
Thank you for considering contributing to Siteguard Logger! Please review our contributing guide to get started.
Credits
License
Siteguard Logger is open-sourced software licensed under the MIT license.