• 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

Xdebug in Laravel is not working with VSCode

How to override header set in Apache config with more specific header in a virtual host

How can I make Laravel return a custom error for a JSON REST API

How to get the survey List from surveygizmo API in the Postman?(Trial Version)

Required field only if another field has a value, must be empty otherwise

Dynamic dropdown Ajax PHP request

Login if user is active using Laravel Breeze

Match csv filenames to table names and import

Sort a multidimensional array by integer inside of a string value which is two levels down

Get image type from base64 encoded src string

nginx err_connection_refused, can anyone help me?

Send POST data via raw JSON with Postman

WordPress - Dynamically add user ID to the end of a URL

Zig-zag scan an N x N array

Custom Button next to “ADD TO CART” button of WooCommerce based on Product Type

About Contact Privacy policy Terms and conditions