PHP code example of hostlink / puxt-log

1. Go to this page and download the library: Download hostlink/puxt-log 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/ */

    

hostlink / puxt-log example snippets

 
"modules" => [
    "hostlink/puxt-log"
],

"log" => [
    "name" => "puxt",
    "handler" => [
        [
            "stream" => __DIR__ . "/log/" . date("Y-m-d") . ".log",
            "level" => Monolog\Logger::INFO
        ]
    ]
]

$context->log->info($message,$data);