• 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 block shortcut in Visual Studio Code

Cant seem to get the Pagination to work on my WooCommerce REST API application?

Put content of wordpress page inside div

Handling expired token in Laravel

Login if user is active using Laravel Breeze

How to install php yaml on CentOs?

Reducing authentication calls on external API (Laravel 5.6)

Load a .env file with PHP

Parsing JSON File to array in PHP

Input and output values for php into the browser?

unable to load your default controller on Codeigniter

Laravel 5 session not persisting after user is logged in

Star rating with half star support

Laravel display validation error

Woocommerce Edit Message "An account is already registered with your email address. Please log in."

About Contact Privacy policy Terms and conditions