• 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 5.2: Unable to locate factory with name [default]

PHP: set a (deep) array key from an array [closed]

Fatal error: Uncaught mysqli_sql_exception: Unknown database 'test' in ... (How do I fix that? Using PHP)

How to show selected value using javascript in laravel

ldap is missing from system when installing adldap2 in laravel

How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

Laravel Collections. Is there some kind of assertStructure method?

Yii2 select2 database exception number of bound variables does not match number of tokens

str_replace or preg_replace random number from string

ConstraintViolationListInterface to Exception in Symfony

Remove country code from phone number?

PHP array sort and remove duplicates by two field values

WAMP Virtual Host not working

How to extract price from given url using Xpath?

Artisan, creating tables in database

About Contact Privacy policy Terms and conditions