1. Go to this page and download the library: Download mvf-tech/system_logger 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/ */
mvf-tech / system_logger example snippets
use MVF\SystemLogger\Reporters\Remotes\DataDog\DataDog;
use MVF\SystemLogger\Reporters\Host\CommandLine;
use MVF\SystemLogger\SystemLogger;
$logger = new SystemLogger();
$logger->info(
["some_kind_of_tag", "key" => "another_tag"],
"message",
new CommandLine(),
DataDog::histogram("metric_name_suffix", 2)
);
$logger->info(
[
"name" => "Bob" // tag key name
],
"There are :1 messages from :name",
new CommandLine(), // reporter index 0
DataDog::histogram("messages", 2), // reporter index 1
... // reporter index ...
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.