• 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

How to edit Records using CodeIgniter

Inserting Country Selection into MySQL PHP [duplicate]

Laravel SQL query midnight time not showing

how to see if database exists with PDO [duplicate]

Why does array_map() with null as callback create an "array of arrays"?

How can I get user id from session in javascript?

Creating command to backup MySql database in Laravel

Redis Command To Sort Keys

Exact alternate to mcrypt_encrypt in PHP 7.2

The "client_reference_id" argument is not passed

Doctrine ORM: Excluding Records Based on Values of Nested Relationships

PHP Get value from JSON [duplicate]

Remove country code from phone number?

loop through an anchor id

laravel sanctum Route [login] not defined

About Contact Privacy policy Terms and conditions