• 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 average columns of data from multiple, flat arrays?

Sort multidimensional array by column value within a column

The "client_reference_id" argument is not passed

Extract string between first whitespace and last whitespace in php

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

How to separate letters and digits from a string in php

How to increase the PHP upload limits [duplicate]

Substitute integers and dots with regex [duplicate]

How to set a domain name with php artisan serve

How to get quarter for future date using Carbon?

301 Redirect to remove query string on homepage only

The difference when using if statement true === something() vs something() === true [duplicate]

Limit login attempts in Laravel 5.7

codeigniter 4 running error first time with xampp

Laravel multi auth - Authentication user provider [] is not defined

About Contact Privacy policy Terms and conditions