PHP code example of urmaul / yii-formattedfilelogroute

1. Go to this page and download the library: Download urmaul/yii-formattedfilelogroute 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/ */

    

urmaul / yii-formattedfilelogroute example snippets


array(
	'class'      => 'ext.formattedfilelogroute.FormattedFileLogRoute',
	'format'     => "{time}\t{ip}\t{msg}",
	'categories' => 'application',
	'logFile'    => 'formatted.log',
),

array(
	'class'   => 'ext.formattedfilelogroute.FormattedFileLogRoute',
	'format'  => "{time}\t{ip}\t{category}\t{uri}\t{message}",
	'except'  => 'exception.CHttpException.404',
	'levels'  => 'error',
	'logFile' => 'error.log',
),
array(
	'class'      => 'ext.formattedfilelogroute.FormattedFileLogRoute',
	'format'     => "{time}\t{ip}\t{uri}\t{sref}",
	'categories' => 'exception.CHttpException.404',
	'logFile'    => 'error404.log',
),