• 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 update hasMany relationship using saveMany

Fatal error: Array callback has to contain indices 0 and 1

Session timeout in Yii2

selected value from the listbox in php

Transform array, set each array element with parent key php

correct PHP headers for pdf file download

How to get transaction details in notify_url page in paypal

How to increase the PHP upload limits [duplicate]

How to fix Call to undefined method AppModelsTableName::factory?

PHP: Insert marker every 3 iterations

Implode columnar values between two arrays into a flat array of concatenated strings

PhP how to calculate moments with variables rows

How to separate letters and digits from a string in php

Laravel You requested 1 items, but there are only 0 items available

WHERE IN array binding in DB::raw laravel 5.4

About Contact Privacy policy Terms and conditions