PHP code example of zalora / punyan
1. Go to this page and download the library: Download zalora/punyan 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/ */
zalora / punyan example snippets
$config = [
'writers' => [
['stream' => [
'url' => '/tmp/myproject.log',
'filters' => [
['priority' => ['priority' => 'info']]
]
]]
]
];
use Zalora\Punyan\Logger;
use Zalora\Punyan\ZLog;
ZLog::setInstance(new Logger('MyAppName', $config));
...
ZLog::info('Informative log message', ['param1' => 'stuffs']);