1. Go to this page and download the library: Download toropyga/flog library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Toropyga\DB;
$DB = new DB\MySQL();
$LOG->setDB($DB);
$message = "log text for {user}";
$context = array("user" => "you", "other" => "Other information"); // optional parameter
$LOG->debug($message, $context);
$LOG->info($message, $context);
$LOG->notice($message, $context);
$LOG->warning($message, $context);
$LOG->error($message, $context);
$LOG->critical($message, $context);
$LOG->alert($message, $context);
$LOG->emergency($message, $context);
$level = "debug";
$message = "log text for {user}";
$context = array("user" => "you"); // optional parameter
$LOG->log($level, $message, $context); // save the log
$message = "log text";
$file = "file_log_name";
$LOG->set2Log($message, $file); // save the log
$LOG->setLevel('debug'); // set the log level, if needed
$logs = array();
$logs['log'][] = "log text line 1";
$logs['log'][] = "log text line 2";
$logs['log'][] = "log text line 3";
$logs['file'] = "file_log_name";
$LOG->setArray2Log($logs); // save the log
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.