• 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 change the app environment at run time?

Access relation of pivot table in Laravel

Filter WooCommerce products with post__in and additional meta queries

500 (Internal Server Error) with Laravel & Docker [duplicate]

Chunk and transpose a flat array into rows with a specific number of columns

how to get the header value, if we don't know the value because the value is random from the server

Laravel Database Strict Mode

Failed user login on production server using Symfony framework (Authentication request could not be processed due to...)

dockerizing Laravel + vue

Why does using salted hash on python and php give me different results?

array_map triple dimensional array [duplicate]

How to use $this->session->set_userdata in codeigniter

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

printing all running session variable in laravel 5.1

Image upload not working through ajax Laravel

About Contact Privacy policy Terms and conditions