• 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

retrieve data from database using session

How update php.ini on a Mac OS X Mojave?

PHP file_get_contents function

Can't find vendor/autoload.php for Ratchet

Form repeater send wrong data with last element in Laravel

Autoloading classes in PHPUnit using Composer and autoload.php

Message: Set sys_temp_dir in your php.ini after installed composer

WooCommerce Additional Information - if empty, hide

Valet, Xdebug after reboot Big Sur not working

If you intend you use SMTP, add your SMTP Code after this Line

json_encode turns array into an object

cakephp save drag and drop list order to database

WHERE IN array binding in DB::raw laravel 5.4

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

Custom post type single page not working

About Contact Privacy policy Terms and conditions