• 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

Popup Window and PHP form

How to insert data from multiple select dropdown values into database?

Laravel unique validation on multiple columns

Can we define variables in `.tpl` files?

PHP/HTML: Creating A SubMenu

Why does using salted hash on python and php give me different results?

PDOException SQLSTATE[HY000] [2002] No such file or directory

Edit XML in HTML form and submit to self

args[max_input] woocommerce if statement confused

Detect a fetch request in PHP

The difference when using if statement true === something() vs something() === true [duplicate]

WHERE IN array binding in DB::raw laravel 5.4

VB.NET WebRequest with PHP POST

Show only featured products in Woocommerce shop page

PHP rotate matrix counter-clockwise

About Contact Privacy policy Terms and conditions