Download the PHP package mrplentl/form-logger-plus without Composer
On this page you can find all versions of the php package mrplentl/form-logger-plus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mrplentl/form-logger-plus
More information about mrplentl/form-logger-plus
Files in mrplentl/form-logger-plus
Package form-logger-plus
Short Description Sometimes I just need a File Logging Solution, and this is my personal take on it. The best part about this logger is that it tracks user interactions with Form Elements without any configuration.
License MIT
Informations about the package form-logger-plus
FileLoggerPlus
Cause sometimes you just need a quick and easy File Logging Solution - Originally Built for Laravel users
The main purpose of this package is to LOG to a file not just from the server side, but also from the client side, but more so especially when using forms. As the user fills out a form and they move from input to input, the FileLogger will write the field data/value to the log file.
Features
- Separate files for History, Errors, SQL, and User Logs
- Form Element listeners log to a file everything that the user clicks or types
- Log entries from the Server side with PHP and Client browser side using JavaScript
- Toggle Trace logging On and Off for low level code logging when needed
- Easy to deploy
Quick Setup
Install with Composer:
composer require mrplentl/form-logger-plus
Make sure you have your autoloader required at the top of your PHP file and add the FormLoggerPlus\Log2File namespace.
require_once(__DIR__ . "/../vendor/autoload.php");
// NOT using Laravel? Make sure to require the autoloader... Contains all the main logging functionsuse FormLoggerPlus\Log2File;
// Make sure to add the Namespace to the top of the files you want to use it with- NOTE: jQuery is REQUIRED for the front end logging and MUST BE loaded before the following ajax_log2file.js
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="/js/form-logger-plus/ajax_log2file.js"></script>
// The files will be auto-generated, just add this to your HEAD- HINT: There is a demo.php file included that will let you play with the functionality as well. Just move it to your public web root directory
Quick Start
Server Logging
Client Side JavaScript Logging
Log File Sample
Version 2 Available NOW
I just finished what I plan to be the final version of this basic logging format. I will be working on my FormLoggerPlus from here on out that will be far more robust and use the more convenient composer install.
FULL SETUP
Included in __config.php
The following Log paths can be set to Absolute Paths so you can set the path outside of the Site for security Currently using .htaccess to block people
Special Features
- Trace Mode is great for expansive logging that you might want to turn on and off from time to time without writing and deleting code define("TraceMode", TRUE); //FALSE: Trace() deactivated; TRUE: Trace() activated
- User tracks are for logging specific users. When set to TRUE, users will have their own log file along with the History log. define("Usertrack_Available", TRUE); //FALSE: Usertrack log deactivated; TRUE: Usertrack log activated
Full Method List
License
All files are published using GNU General Public License (GPL) version 3. I'm guessing I picked the right one, but basically, I don't care what you do with this code.
The FileLogger Team
There is no "I" in Team... but in this case, it's just me. :) My FormLoggerPlus package is currently maintained by Brandon Plentl,
Thank you!
I really appreciate all kinds of feedback and contributions. Let me know if any of this is useful!