• 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 do I need to place a hook for phpunit?

How to trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

How to modify CSS in a specific page of the WP admin dashboard (backend)

Laravel Schedule not sending email

Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables 11 [closed]

zsh: command not found: php

laravel controller function parameters

How to create laravel storage symbolic link for production or sub domain system?

How to update array value in Laravel

Laravel 4 Redirect::back() not going to previous page (refreshing current page)

How to average columns of data from multiple, flat arrays?

Yii Ajax Submit button

Declaration of OMDb::query(string $statement) must be compatible with PDO::query

Combine array with same value and add other [duplicate]

Why does codeigniter & Linux server throws unserialize() session data error when user tries to login

About Contact Privacy policy Terms and conditions