• 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

CodeIgniter 3 is generating a session file on each request, why?

codeigniter 4 running error first time with xampp

Find out the name of the last script that included the current one

Insert a DIV after the 6th product only once in WooCommerce category archives

Add a custom text for a particular product on specific email notification in Woocommerce

Display a product custom field only in WooCommerce Admin single orders

Accessors (Getter) & Mutators (Setter) On a Pivot Table in Laravel

Laravel get user data with profile

How to show a popup modal in codeIgniter?

Symfony - "framework.test" config is not set to true

Printing more than one array using print_r or any other function in php

how to fix Service provider class not found when using repository?

Message: Set sys_temp_dir in your php.ini after installed composer

Make survey at laravel 5.4 and MySQL

Laravel relationship belongsToMany with composite primary keys

About Contact Privacy policy Terms and conditions