• 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 - CURL using HTTPS [closed]

How to add a sidebar to Woocommerce Shop Page?

Updating and Synchronizing Woocommerce Subscriptions to Custom Date

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

PHPMetrics option --excluded-dirs="myfolder" : myfolder dir is not excluded within docker

Load a .env file with PHP

Undefined variable in Laravel 8 project (php 7.4)

virtctl works when executed via command line but not from php exec()

phpunit - mockbuilder - set mock object internal property

IlluminateDatabaseQueryException could not find driver [duplicate]

php script to delete files older than 24 hrs, deletes all files

add " ? " in url via htaccess RewriteRule

Transpose multidimensional array and join values with commas

Filter array by skipping every nth element from the end

PHP Slim Framework request using withAttribute error

About Contact Privacy policy Terms and conditions