• 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 Include for HTML?

Get sql.h error on MacOS 12 (Monterey) sqsrv and pdo_sqsrv drive installation

PHP random string generator

Laravel views are showing from cache on one server but works fine on other server

PHP - CURL using HTTPS [closed]

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

How to check user Permissions using Custom Middleware in Laravel

PhpSpreadSheet: How to save Workbook sheets in individual CSV files

Get WooCommerce products from specific category

How can I stop a symfony process which is listening on http://127.0.0.1:8000

Could not decode a text frame as UTF-8.

How to reset Laravel AuthManager/guards in between API calls in tests?

How avoid Moved Permanently The document has moved here

How to get unique slug to same post-title for other time too?

PHP Download MP3 files from directory on server

About Contact Privacy policy Terms and conditions