• 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

Why is this PHP array not the same?

Dropdown with current value from Mysql

How to assert parameter attribute sub-structures in PHPUnit mock call expectations

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'column_name' in Laravel

Split comma separated value from table column into rows using mysql?

HTML and PHP in one file

Trying to iterate over a mongodb cursor twice - failing

Get orders by date and status woocommerce

How to install LDAP in Docker php-fpm alpine

What is my SQL missing?

Download & Save Zoom Recording in directory by PHP

Lexik JWT authentication problem "Invalid credentials"

CodeIgniter force_download is not working

Show only featured products in Woocommerce shop page

Statement that checks whether a URL contains a particular path?

About Contact Privacy policy Terms and conditions