• 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

HTTP Range requests with php for Video Embedding for solving going to specific time in video (seek bar not work)

Fatal error: Trait 'LaminasDbAdapterLaminasDbAdapterAdapterInterface' not found in /var/www/vendor/laminas/laminas-db/src/Adapter/Adapter.php

Laravel passport auth token not working after moving to different server

Normalize DateInterval in PHP

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

Xdebug can't connect back to Docker host

Redis Command To Sort Keys

auth pages not getting css in laravel

How to make autocomplete work in foreach php loop? (vscode, intellisense)

Show date difference as "20" instead of "20 years ago"

Cant seem to get the Pagination to work on my WooCommerce REST API application?

PHP array_filter with arguments

Symfony autowiring issues since docker update

Laravel Excel::store file empty after stored

Adding the custom page with add_menu_page function on Wordpress

About Contact Privacy policy Terms and conditions