Download the PHP package alpha-dev-team/logger without Composer
On this page you can find all versions of the php package alpha-dev-team/logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alpha-dev-team/logger
More information about alpha-dev-team/logger
Files in alpha-dev-team/logger
Package logger
Short Description Logger via db records, telegram and files. Based on Laravel logger.
License MIT
Informations about the package logger
Alpha-Dev-Logger
Requirements
- PHP v8.1+
Description
Logger via db records, telegram and files. Based on standard Laravel logger. It also utilizes the Monolog library. Plus, Alpha-Dev-Logger comes with a simple administration panel for reading, change status and delete log records.
Installation
First step is install Alpha-Dev-Logger via the Composer command
Next important step is published configuration file logger-alpha.php
Also need run migration for new logs table:
Configuration
General
Since Alpha-Dev-Logger based on standard Laravel logger, some configurations need to be made in logging.php in channels array. For convenience, all needed changes in logging.php contain in logger-alpha.php in channels array.
DB
Set in logging.php in channels (You can find it in logger-alpha.php in channels array):
Telegram
If You want to get log errors to Telegram channel set in logging.php in channels (You can find it in logger-alpha.php in channels array):
For using Telegram notifications it is necessary to determine and set telegram api bot and telegram channel name in Your .env file:
Also, You can make some changes for Telegram message view in logger-alpha.php.
Daily Files
If You want save log errors in files in json format, set in logging.php in channels (You can find it in logger-alpha.php in channels array):
Parameter days in daily array sets the retention period for files. You can set another.
General
Finally, make sure, that current log channel is stack in .env file.
And the last. Add to logging.php to array channels.stack.channels channels, that You will use:
Panel
Alpha-Dev-Logger comes with a simple administration panel for reading, change status and delete log records. You can make some changes for panel rotes in logger-alpha.php.
Fresh Logs
For refresh logs db retrieved special command RefreshLogsTable. You can configure edge date time for soft delete records and edge date time for totally delete records in logger-alpha.php in db.remove_in_months
Also, You can add this command to Task Scheduling in App\Console\Kernel to schedule method. For example every month: