• 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

php mysql + create a friend request system

Autoloading classes in PHPUnit using Composer and autoload.php

Detect emoticons in string

Getting error: CodeIgniterDatabaseBaseResult::getResult in CodeIgniter

MySQL order by field in Eloquent

PHP Slim Framework request using withAttribute error

How to extract price from given url using Xpath?

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

PHP Form Not Inserting

enable Apache http Authorization header

I need to link Google Sheet with my Laravel

google content api for shopping

No definition found for function in vendor vscode

How can I get data from PHP to Android TextView?

Class AppHttpControllersUserController Does Not Exist

About Contact Privacy policy Terms and conditions