• 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

Backend cannot be reached after Typo3 login screen

Sum array values of a column within each column of an array with 3 levels

Unable to run composer install

Laravel 5.2: Unable to locate factory with name [default]

MySQL - Connection failed: No route to host

PHPS source file - 403 Forbidden You don't have permission to access this resource

PHP how to detect if running on arm64 cpu?

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

Laravel Sanctum CSRF not authenticating

Laravel Factory not calling callback 'afterCreating'

Target class controller does not exist - Laravel 8

Creating live search with AJAX and CodeIgniter

yii2 and mssql insert varbinary into model

Prestashop webservice API creating cart rules

Why does array_map() with null as callback create an "array of arrays"?

About Contact Privacy policy Terms and conditions