PHP code example of nona-creative / log
1. Go to this page and download the library: Download nona-creative/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/ */
nona-creative / log example snippets
use Nona\Log\Logger;
$log = Logger::getInstance('demo');
$log->info('Hello world log message');
use Nona\Log\LogConfig;
use Nona\Log\Logger;
Logger::setGlobalConfig(new LogConfig('demo-app', 'udp://localhost:5000', 'localhost'));
$log = Logger::getInstance('demo');
$log->info('Hello world log message', ['hello' => 'world']);