• 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

WHERE IN array binding in DB::raw laravel 5.4

Fatal error: Uncaught Error: Call to undefined method mysqli_stmt::fetch_assoc() [duplicate]

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

PhP how to calculate moments with variables rows

Send same name multiple checkbox values via ajax

How can I easily switch between PHP versions on Mac OSX?

str_word_count() function doesn't display Arabic language properly

phpmyadmin : Depends: php-twig (>= 2.9) but 2.6.2-2 is to be installed. WHAT?

Parsing JSON File to array in PHP

Using Associative arrays

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

Laravel 5.5 change unauthenticated login redirect url

PHP | "The requested PHP extension bcmath is missing from your system."

PHP Deprecated issue when running artisan command

Saving Data from form to database using AngularJS and php

About Contact Privacy policy Terms and conditions