Skip to content

This package is a Laravel wrapper for LogHub.cloud - A platform to aggregate your logs in one simple dashboard

License

Notifications You must be signed in to change notification settings

1aWebmarketing/loghub-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Laravel wrapper for LogHub.cloud

LogHub is a cloud logging platform to aggregate your logs from all your projects.

Installing

The recommended way to install LogHub PHP is through Composer.

composer require oneawebmarketing/loghub-laravel

Activation

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();

.env file and configuration

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.

Security

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.

License

This repository is made available under the MIT License (MIT). Please see License File for more information.

About

This package is a Laravel wrapper for LogHub.cloud - A platform to aggregate your logs in one simple dashboard

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages