bvcmxy/error-log

There is no license information available for the latest version (9) of this package.

Library to send logs to ErrorLog

Maintainers

Package info

github.com/bvcmxy/error-log

pkg:composer/bvcmxy/error-log

Statistics

Installs: 799

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

9 2024-10-22 11:51 UTC

This package is not auto-updated.

Last update: 2026-04-21 21:20:59 UTC


README

Install the package Run composer require bvcmxy/error-log:dev-main

Publish the config file Run php artisan vendor:publish --tag=error-log-config

Change config/error-log-config.php uri to point to error log server

return [
    'api_uri' => env('ERROR_LOG_API_URI'),
    'context' => [
        'application' => env('APP_NAME', 'default_app'),
        'env' => env('APP_ENV', 'production'),
        'type' => env('LOG_TYPE', 'general'),
        'version' => env('APP_VERSION', null),
        'user' => env('LOG_USER', null),
        'device' => env('LOG_DEVICE', null),
        'now' => env('LOG_NOW', \Carbon\Carbon::now()->toDateTimeString()),
    ]
];

Add in config/logging.php

 ...,
 'error-log' => [
        'driver' => 'custom',
        'via' => \Bvcmxy\ErrorLog\Logging\ErrorLogApi::class,
    ],

Changes in .env

LOG_CHANNEL=error-log
...
APP_VERSION=1.0.0
ERROR_LOG_API_URI=https://errorlog.zf-world.com/api/logs