PHP code example of nti / log-bundle

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

    

nti / log-bundle example snippets


public function registerBundles()
{
    $bundles = array(
        ...
        new NTI\LogBundle\NTILogBundle(),
        ...
    );
}

logNotice($message, $action = Log::ACTION_INFO, $entity = null)
logSuccess($message, $action = Log::ACTION_INFO, $entity = null)
logWarning($message, $action = Log::ACTION_INFO, $entity = null) 
logDebug($message, $action = Log::ACTION_DEBUG, $entity = null)
logError($message, $action = Log::ACTION_INFO, $entity = null)    
logException(\Exception $ex) 
logSlack($message, $level = Log::LEVEL_NOTICE, $entity = null)