• 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

I want a way to give path to my files which are outside of public folder in laravel

PHP sort array of objects by two properties

MOODLE: What does it mean to aggregate h5p assets?

SMTP ERROR: MAIL FROM command failed: 530 5.7.0 Must issue a STARTTLS command first when using PHPMailer

Return new collection without modifying original collection

Read users and passwords from a txt file

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

PHPUnit 7: Failed asserting that exception of type InvalidArgumentException is thrown

Converting array to string and then back in PHP

PHP DOTENV unable to load env vars

echo language construct is discouraged. (PHP)

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

Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars'

Appending data to an anchor tag

Select option menu read from database and use it's values

About Contact Privacy policy Terms and conditions