• 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

Laravel views are showing from cache on one server but works fine on other server

Unit (real unit test) of test laravel relationship

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

Wordpress wpdb->delete issue

Laravel set default language not working

Add a custom text for a particular product on specific email notification in Woocommerce

Prestashop cUrl Login

The "client_reference_id" argument is not passed

Confirm Leave on External Links in Wordpress

How to run or debug php on Visual Studio Code (VSCode)

How can I get user id from session in javascript?

Reload parent page after submit in iframe

Convert every two values of an associative array into key-value pairs

Cache clear probem in Larave

How to make a foreign key not using primary key

About Contact Privacy policy Terms and conditions