LogHub is a cloud logging platform to aggregate your logs from all your projects.
The recommended way to install LogHub PHP is through Composer.
composer require oneawebmarketing/loghub-laravel
In your bootstrap/app.php
add the LogHubExceptionsHandler to your Exception Handlers
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use LogHub\LogHubExceptionsHandler;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
})
->withExceptions(function (Exceptions $exceptions) {
LogHubExceptionsHandler::handles($exceptions);
})->create();
Provide your LogHub.cloud API Key in your .env with the key LOGHUB_API_KEY
By default the plugin will be sending Logs to LogHub if in local
and production
environment but feel free to change this as you like.
For this you can use the below artisan command and choose LogHub\ServiceProvider
.
php artisan vendor:publish
Set the desired environments in config/loghub.php
.
If you discover a security vulnerability within this package, please send an email to security@loghub.cloud. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced.
This repository is made available under the MIT License (MIT). Please see License File for more information.