LaravelPackages.net
Acme Inc.
Toggle sidebar
rhyslees/log-channel-laravel

This is my package log-channel-laravel

15
0
1.0.1
About rhyslees/log-channel-laravel

rhyslees/log-channel-laravel is a Laravel package for this is my package log-channel-laravel. It currently has 0 GitHub stars and 15 downloads on Packagist (latest version 1.0.1). Install it with composer require rhyslees/log-channel-laravel. Discover more Laravel packages by rhyslees or browse all Laravel packages to compare alternatives.

Last updated

This is my package log-channel-laravel

Installation

You can install the package via composer:

composer require rhyslees/log-channel-laravel

Add the following to your config\logging.php file:

'channels' => [
    ...
    
    'logchannel' => [
        'driver' => 'custom',
        'via' => \RhysLees\LogChannelLaravel\LogChannelLaravel::class,
        'key' => env('LOG_CHANNEL_KEY', ''),
        'app_id' => env('LOG_CHANNEL_APP_ID', ''),
        'endpoint' => env('LOG_CHANNEL_ENDPOINT', 'https://logchannel.co.uk/api/app'),
    ],
    
    ...
],

Then add the channel to the stack:

'stack' => [
    'driver' => 'stack',
    'channels' => ['single', 'logchannel'],
    'ignore_exceptions' => false,
],

You can publish the config file with:

php artisan vendor:publish --tag="log-channel-laravel-config"

This is the contents of the published config file:

return [
    'key' => env('LOG_CHANNEL_KEY', ''),
    'app_id' => env('LOG_CHANNEL_APP_ID', ''),
    'endpoint' => env('LOG_CHANNEL_ENDPOINT', 'https://logchannel.co.uk/api/app'),
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="log-channel-laravel-views"

Usage

As Log Channel

As Facade

$logChannelLaravel = new RhysLees\LogChannelLaravel();
echo $logChannelLaravel->echoPhrase('Hello, RhysLees!');

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments