PHPackages                             mrplentl/form-logger-plus - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. mrplentl/form-logger-plus

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

mrplentl/form-logger-plus
=========================

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.

v2.2(8y ago)071MITPHPPHP &gt;=5.5

Since Dec 9Pushed 8y ago1 watchersCompare

[ Source](https://github.com/MrPlentl/FormLoggerPlus)[ Packagist](https://packagist.org/packages/mrplentl/form-logger-plus)[ RSS](/packages/mrplentl-form-logger-plus/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (5)Used By (0)

FileLoggerPlus
==============

[](#fileloggerplus)

### Cause sometimes you just need a quick and easy File Logging Solution - Originally Built for Laravel users

[](#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
--------

[](#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
-----------

[](#quick-setup)

#### Install with Composer:

[](#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 functions
- `use 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
- ``
- `` // 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
-----------

[](#quick-start)

Server Logging

```
$log = new Log2File();
$log->History("Let's Start Logging!");

```

Client Side JavaScript Logging

```
History('Log Me to a File!');

```

#### Log File Sample

[](#log-file-sample)

```
10:52:06 User Click  -> [test_button] => MyButton
10:52:07 User Entry [text]      -> [test_text] => Brandon
10:52:08 User Entry [text]      -> [X_test_text] => ** Not Tracking **
10:52:09 User Entry [text]      -> [CCnum] => ****4685
10:52:09 User Entry [checkbox]  -> [checkbox1] => Checkbox 1
10:52:11 User Entry [radio]     -> [Myradio2] => Radio 2
10:52:12 User Entry [radio]     -> [Myradio1] => Radio 1
10:52:13 User Entry [select]    -> [countries] Drop Down Selected => Albania

```

Version 2 Available NOW
-----------------------

[](#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
----------

[](#full-setup)

### Included in \_\_config.php

[](#included-in-__configphp)

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

```
define("Log_Path",              "../_logs");                // General Log directory
define("Sql_Log_Path",          "../_logs");                // This is just for the separate log file for SQL transactions. Normally this is for INSERTS and UPDATES
define("Usertrack_Log_Path",    "../_logs/usertracks");     // Usertrack_Log() creates a daily log for each user
define("Util_Log_Path",         "../_logs");                // UtilLog() gives the logging ability for Commandline Utility Scripts/Programs; Not meant to be used from the Browser
define("JS_DIR_Path",           __DIR__ . "../../../../public/js");  // Path to the webserver javascript folder

```

#### Special Features

[](#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

[](#full-method-list)

```
function History( $item );
    == General Log files
function UtilLog( $item );
    == Utility Log files - Used for primarily for local CLI scripts
function LogInput();
    == Logs any and all $_POST and/or $_GET values; Fields with CCnum will only print the last 4
function LogServerInfo();
function Trace( $item );
SQLHistoryLog( $SqlScript );
function ErrorLog ( $item, $logSessionInfo=FALSE );
function ErrorSessionLog();
function send_error_notification()

```

License
-------

[](#license)

All files are published using [GNU General Public License (GPL) version 3](https://www.gnu.org/licenses/license-list.html#GNUGPL). I'm guessing I picked the right one, but basically, I don't care what you do with this code.

The FileLogger Team
-------------------

[](#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](https://github.com/MrPlentl),

Thank you!
----------

[](#thank-you)

I really appreciate all kinds of feedback and contributions. Let me know if any of this is useful!

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~77 days

Total

4

Last Release

3256d ago

Major Versions

v1.01 → v2.02017-07-30

PHP version history (2 changes)v1.01PHP &gt;=5.3.6

v2.0PHP &gt;=5.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1365909?v=4)[Brandon Plentl](/maintainers/MrPlentl)[@MrPlentl](https://github.com/MrPlentl)

---

Top Contributors

[![MrPlentl](https://avatars.githubusercontent.com/u/1365909?v=4)](https://github.com/MrPlentl "MrPlentl (23 commits)")

### Embed Badge

![Health badge](/badges/mrplentl-form-logger-plus/health.svg)

```
[![Health](https://phpackages.com/badges/mrplentl-form-logger-plus/health.svg)](https://phpackages.com/packages/mrplentl-form-logger-plus)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B10.9k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1938.5M262](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2326.5M315](/packages/open-telemetry-sdk)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8676.7k](/packages/illuminated-console-logger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
