starring-jane/logging

Logging made for use inside laravel apps

v1.0.3 2024-03-08 09:47 UTC

This package is auto-updated.

Last update: 2024-04-08 10:00:36 UTC


README

#Starring Jane logging tool for Laravel

Available channels

  • Teams
  • Loggly

Installation

Run the composer install command to install the package

composer require starring-jane/logging

Configuration

Optionally you can publish the config file with:

php artisan vendor:publish --provider="StarringJane\Logging\LoggingServiceProvider" --tag="config"

Set up the following environment variables in your .env file:

TEAMS_WEBHOOK_URL=
LOGGLY_TOKEN=
LOGGLY_TAG=

When one or multiple of these variables are not set, the corresponding logging channel will not be used.

Finally, all you need to do is add the following line to your config/logging.php file and enable the channel in stack channels or as a single channel:

'channels' => [
    ...
    'starringjane' => [
        'driver' => 'custom',
        'via' => \StarringJane\Logging\Logging\LoggerChannel::class,
        'level' => 'notice',
    ],
    ...
],