• 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

Set quantity minimum, maximum and step at product level in Woocommerce

Warning: sqlite_query() expects parameter 1 to be resource, string given

PHP block shortcut in Visual Studio Code

Laravel csrf token mismatch for ajax POST Request

Get data from accuweather api url

How to get AJAX to post on second page?

Creating live search with AJAX and CodeIgniter

Select option menu read from database and use it's values

PHP Include for HTML?

Mysqli Output to a table

How to check user Permissions using Custom Middleware in Laravel

Xdebug can't connect back to Docker host

PHP sort array of objects by two properties

how to remove %20 in the url in php

PHP - Store information with NO database

About Contact Privacy policy Terms and conditions