Ratings | | Unique User Downloads | | Download Rankings |
Not yet rated by the users | | Total: 25 | | All time: 11,214 This week: 571 |
|
Description | | Author |
This class can write log messages to files in CSV or JSON formats.
It can take a variable value and it converts it to a string encoding it in the CSV or JSON formats or using PHP print_r function before it appends the converted string to a file.
The log file is written to a specific file in a given directory. The file name has perfix and the current date as suffix. | |
|
|
Innovation award
Nominee: 5x |
|
Example
<?php
include('LaravelLog.php');
$log = (new LaravelLog);
//set path
$log->setPath(getcwd());
//set filename
$log->setFileName('requests');
//log arrays, objects, integers or strings in either .log, .json and .csv file formats by setting the extension in the second argument
$log->logData((object) $_SERVER, 'json');
|
Details
"# PHP-Log-Writer"
Usage
Include class
include('LaravelLog.php');
Set file name
$log->setFileName('requests');
Log arrays, objects, integers or strings in either .log, .json and .csv file formats by setting the extension in the second argument
$log->logData((object) $_SERVER, 'json');
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.