• 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

php echo xml documents with header

How to display table header in every page using FPDF library?

Encrypt in php and decrypt in Dart(flutter)

Convert PHP array into HTML tag attributes separated by spaces

Dynamic dropdown Ajax PHP request

How to get quarter for future date using Carbon?

Wordpress add responsive srcset header image to theme

Target Individual Form Instance/Counter Inside A PHP While Loop

insert multiple rows in a saveall in cakephp

how to identify the web server name of remote host

How to validate Envato Purchase Code in PHP

How to trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

How to use React Router with Laravel?

cakephp save drag and drop list order to database

No definition found for function in vendor vscode

About Contact Privacy policy Terms and conditions