• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Yii2: How do I debug console commands?

phpdebuggingconsoleyii2command-line-interface


PHP Snippet 1:

'log' => [
'targets' => [[
    ...
], [
    'class' => 'yii\log\FileTarget',
    'logFile' => '@runtime/logs/profile.log',
    'logVars' => [],
    'levels' => ['profile'],
    'categories' => ['yii\db\Command::query'],
    'prefix' => function($message) {
        return '';
    }
]]

PHP Snippet 2:

[
    'class' => 'yii\log\FileTarget',
    'levels' => ['info', 'error', 'warning'],
],

Related Snippets

How to change the app environment at run time?

How to unlink image from folder?

Check If array is null or not in php

Laravel after login Two factor not working

PHP only Hit Counter?

PHPExcel How to set conditional formatting to change cell background color based on cells values

Assign output of PHP function to a variable

(Laravel) How to delete multiple models including optional relationships?

Symfony - EasyAdmin - Add and remove functions are ignored from AssociationField

virtctl works when executed via command line but not from php exec()

Adding the custom page with add_menu_page function on Wordpress

image source not readable

PhpSpreadSheet: How to save Workbook sheets in individual CSV files

How to redirect to another page after n seconds in wordpress without using javascript?

Laravel csrf token mismatch for ajax POST Request

About Contact Privacy policy Terms and conditions