Download the PHP package dzaki236/logging-services without Composer
On this page you can find all versions of the php package dzaki236/logging-services. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dzaki236/logging-services
More information about dzaki236/logging-services
Files in dzaki236/logging-services
Package logging-services
Short Description Library for simplify logging laravel and manage log txt, Simple to use, based on data
License MIT
Informations about the package logging-services
logging-services
Package for logging activities, Simple to use!..
Installation Step
Install the package by the following command,
#
Dump Autoloading
Autoloading the package by the following command,
#
Add Provider (some case it's step is optional)
Add the provider to your config/app.php
into provider
section if using lower version of laravel,
#
Add Facade (this is optional part)
Add the Facade to your config/app.php
into aliases
section on the last part,
#
Publish the Assets
Run the following command to publish config file,
#
Run migration
if you want to use a table on your logs just run :
Or if you want to reset all of your migrations (with your data seeder)
, just run :
#
Relationship (Optional Part)
If you want to use a relationship to user on table on your logs table just add by the following code on models LogActivity.php
:
Version 7+-
Version 8.x+
Don't forget to add this stuff (namespacing) at first line (before class on model)
on relationship:
And then if you want to use (eager-loading)
,example on code:
#
Change Limit of flush?
Some times you want to custom a value of limit on flushing log,
On folder config
in laravel project at logservices.php
,change by following code (config/logservices.php)
:
#
How To Use?
First, add __construct()
line at first of your controller example : (UserController or whatever Controller it is)
;
Second, example on (UserController Or Controller You have)
, add code by the following code :
#
Function Parameter
All Function Parameter by the following and fill on this can't be random fill!!, must be sequential : |
# | Parameter | Field | default | description | nullable | must added on parameters |
---|---|---|---|---|---|---|---|
1 | status | true or false | true | if success parameter set to true the result will be success ,but if false then result will be failed |
no | yes | |
2 | msglogs | string | string (not nullable) | message logs, write message according to the relevan conditions, but you want to | no | yes | |
3 | flush | true or false | true | if true it will be activated flush | yes | no, but some case yes | |
4 | limit flush | int (1-n) | 1000 | if true it will be activated flush | yes | no, but some case yes | |
5 | dump | true or false | true | if true it will be stored to logactivities file | yes | no, but some case maybe you need |
License
The MIT License (MIT). Please see [License]() File for more information, version of 2.0.2
If had a problem or issue on older version,Please use of the latest version
#
More Feature's here!
Custom File Config (Logging)
New update on 2.0.2 the author add new txt reader,you can use this for your custom log on your controller ^>, First Step you must make config / log config txt file if do not,you will got error :).
Example following by this bellow code :
By default at the version under 2.0.2 you cannot save a txt file of loging, but today you can!,by default at 2.0.2 you allowed to do a save some txt files,like example author had a input txt file on logactivities.txt
at public file on laravel project!,but you can custom file or make a new path custom config, by use a boilerplate class construct,
All Function / Parameter at boilerplate Class,just by the following and see on this can't be random fill!!, must be sequential
:
On model FileServicesConfig
constructor
= YES
!
# | Function | Explanation | path of file on models constructor | Aliases | nullable | namespacing free |
---|---|---|---|---|---|---|
1 | fieldInsert | This function to fill a txt or some config file on your public folder | public of laravel_project/public |
txt and no more like than txt ,just txt |
True,if you want to make alias of object for sure! | yes,but somecase no |
#
On config.txt
file (example)
By default maybe you allowed to randomly fields but not recomended, at first you must fix, what field you want to fill,by default of your version.
Mistake's warning
Library has own stable test,if got error its maybe must check the code in twice, and now this is example code wrong and true
Closure : You must done a some proses and you can return a result of you want
.
License
The MIT License (MIT). Please see License File for more information, version of 2.0.2