Download the PHP package insowe/datalogger without Composer
On this page you can find all versions of the php package insowe/datalogger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download insowe/datalogger
More information about insowe/datalogger
Files in insowe/datalogger
Package datalogger
Short Description Save data logs to Cloud Storage.
License proprietary
Homepage https://github.com/insowe-php/datalogger
Informations about the package datalogger
DataLogger
This package help log the data after every updated, and upload to cloud storage not database to reduce loading of the database.
Installation
Via Composer
Execute php artisan vendor:publish
, choose Provider: Insowe\DataLogger\DataLoggerServiceProvider
to publish database migration to ~/database/migrations/2020_01_22_023910_create_data_logs_table.php
.
You should put all the data types you need to enum column setting.
For example:
This package use queue, make sure the queue environment is ready, or just let
QUEUE_CONNECTION=sync
.
Usage
If an Eloquent Model
will be logged, let it implement the interface Insowe\DataLogger\Models\IData
.
Create a createLog
method in the controller after data has beed updated.
In the method createLog
,get the newest data and trigger the event Updated
, the listener will add a log row to database and make a queue for upload log file to the cloud.
Notice: should hide the machine-updated columns like updated_at, deleted_at and other statistics columns.
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
License
license. Please see the license file for more information.