PHP code example of andrey-helldar / laravel-logger-channels
1. Go to this page and download the library: Download andrey-helldar/laravel-logger-channels library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
andrey-helldar / laravel-logger-channels example snippets
use Helldar\LaravelLoggerChannels\Loggers\ProcessesRotation\DifferentLogsChannel;
return [
'channels' => [
'your_channel' => DifferentLogsChannel::get(
storage_path('logs/your-filename.log')
)
]
];
use Helldar\LaravelLoggerChannels\Loggers\Common\LogFormatter;
use Helldar\LaravelLoggerChannels\Loggers\ProcessesRotation\Logger;
return [
'channels' => [
'your_channel' => [
'driver' => 'custom',
'via' => Logger::class,
'tap' => [LogFormatter::class],
'path' => storage_path('logs/your-filename.log'),
'days' => 7,
]
]
];