PHP Classes

XLogger PHP PSR Logger: Log events to browser console, text and XML files

Recommend this page to a friend!
  Info   View files Example   View files View files (24)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (2)    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 97 All time: 9,744 This week: 148Up
Version License PHP version Categories
xlogger 1.0.1Freely Distributable7.4Debug, Console, Logging, PHP 7, PSR
Description 

Author

This package can be used to log events to the current browser console, text and XML files.

It provides support to logging of events with an interface compliant with PSR 3 PHP Standards Recommendation specification.

Currently it can log events using HTTP headers to pass log values to the current browser. The log messages may appear in the console or a separate Window section of the current browser when a specific browser add-on is installed. There are add-ons available for Firefox and Chrome.

It may also output log information to files in plain text or XML formats.

Recommendations

Create a logger to an application
I need a logger class to insert in file or database.

Innovation Award
PHP Programming Innovation award winner
July 2020
Winner


Prize: 1 Year Subscription to NomadPHP Advanced PHP Learning
PSR-3 is a PHP Standards Recommendation that defines an interface for logging application events.

This package implements a PSR-3 compliant logging solution that allows logging PHP application events using HTTP response headers that can be processed by file browser extensions, so PHP developers can see debug information in the browser console.

Manuel Lemos
Picture of Stefan Kientzler
  Performance   Level  
Innovation award
Innovation award
Nominee: 11x

Winner: 6x

 

Details

XLogger - PSR3 compliant Logging to Browser Console, Text- or XML-File

Latest Stable Version License Minimum PHP Version PHPStan Scrutinizer Code Quality

This package provides PSR-3 compliant Loggers for Output to - Browser Console via FirePHP - Browser Console via Chrome Logger - Plain Text (log, txt, csv) - XML File (can be transformed to HTML with included XSL)

For debugging in particular, it is often very time-saving if the logging output goes directly to the browser console. Since the loggers comply with the PSR-3 specification, they can be used for existing code and there is the possibility to configure the most suitable logger for different scenarios and / or environments (development / test / delpoyment) at runtime.

For more information about the PSR-3 specification visit www.php-fig.org

For logging to the browser console one of the following Add-Ons have to be installed (both are available for Firefox and Chrome): - FirePHP - Chrome Logger

Installation

You can download the Latest Version from PHPClasses.org. The namespaces, class- and filenames meet the PSR-4 autoloader recommendations.

Usage

The use of the available logger classes and the integration of the PSR-3 interfaces / treats can be seen in the examples *XLogTest.phpandTestClass.php*. For XML-HTML Transformation of the XML-Format use Example XSL-Template *XMLLogger.XSL*

FirePHP Add-On

Can be found on www.firephp.org

Chrome Logger Add-On

For Google Chrome can be found on chrome.google.com

For Firefox can be found on addons.mozilla.org

  Files folder image Files  
File Role Description
Files folder imageCCampbell (1 directory)
Files folder imageFirePHP (1 directory)
Files folder imagePsr (1 directory)
Files folder imageSKien (1 directory)
Accessible without login Plain text file autoloader.php Aux. Auxiliary script
Accessible without login Plain text file githubwiki.xml Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpstan.neon Data Auxiliary data
Accessible without login Plain text file readme.md Doc. Documentation
Accessible without login Plain text file TestClass.php Example Class source
Accessible without login Plain text file XLogTest.php Example Example script
Accessible without login Plain text file XMLLogger.xsl Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:97
This week:0
All time:9,744
This week:148Up