• 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

How to keep value of selected value after form submission?

How to run a shell as root from php (apache)

Laravel views are showing from cache on one server but works fine on other server

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

Can't call javascript alert alertify library from PHP

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

Creating command to backup MySql database in Laravel

Natural ORDER in Laravel Eloquent ORM

PHP if in_array() how to get the key as well?

disable two buttons after clicking another button

Not able to override collapsible.js in magento 2

Laravel 5.2: Unable to locate factory with name [default]

Filter WooCommerce products with post__in and additional meta queries

PHPUnit (Phar) Fatal Error Only When Test Fails

Convert date and time to Jalali in Laravel

About Contact Privacy policy Terms and conditions