PHP code example of alpha-dev-team / logger
1. Go to this page and download the library: Download alpha-dev-team/logger 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/ */
alpha-dev-team / logger example snippets
'db' => [
'driver' => 'custom',
'via' => \AlphaDevTeam\Logger\Logging\AlphaDevDBLogger::class,
'level' => env('LOG_LEVEL', 'debug'),
],
'telegram' => [
'driver' => 'custom',
'via' => \AlphaDevTeam\Logger\Logging\AlphaDevTelegramLogger::class,
'level' => env('LOG_LEVEL', 'debug'),
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/daily/laravel.log'),
'tap' => [\AlphaDevTeam\Logger\Logging\AlphaDevLogJson::class],
'level' => env('LOG_LEVEL', 'debug'),
'days' => 14,
],
'stack' => [
'driver' => 'stack',
'channels' => ['daily', 'db', 'telegram'],
'ignore_exceptions' => false,
],
$schedule->command('refresh-logs:run')->monthly();
shell
php artisan vendor:publish --tag=logger-config --force
shell
php artisan migrate
dotenv
LOG_TELEGRAM_BOT_API=999999999:AAAAAAAsAAA9AaAAAaaaAaAaAaAAA99aAaa
LOG_TELEGRAM_CHANNEL=telegram_channel
dotenv
LOG_CHANNEL=stack