• 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

Chunk and transpose a flat array into rows with a specific number of columns

RabbitMQ PRECONDITION_FAILED - unknown delivery tag

Valet, Xdebug after reboot Big Sur not working

Laravel 5.2: Unable to locate factory with name [default]

disable two buttons after clicking another button

Only on Firefox "Loading failed for the <script> with source"

Boolean assignment operators in PHP

Shopify password update using Shopify API

How to make Canonicals with PHP

Magento 2 - How to add new block to admin panel in product page?

Get all WooCommerce products within own plugin

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

dockerizing Laravel + vue

Insert a DIV after the 6th product only once in WooCommerce category archives

how to sort by a custom appended relation to model

About Contact Privacy policy Terms and conditions