• 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

Redis Command To Sort Keys

Xdebug 3 not showing in phpinfo on m1 Monterey

Undefined Array Key error when uploading image on php

MySQL/PHP - Web Based Game -User specific inventory table or 1 giant table? Another option?

sort() not affecting original array while inside foreach loop

Create tags in laravel post publishing

Form repeater send wrong data with last element in Laravel

CSV to PHP class properties

How do I call Validator from a namespace with an already existing Validator class

Send same name multiple checkbox values via ajax

Passing PHP JSON to Javascript: echo json_encode vs echo json declaration

Don't show recurring price for WooCommerce subscriptions worth 0$

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'column_name' in Laravel

Symfony Make:Migration : The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue

PHP Warning: Module already loaded in Unknown on line 0

About Contact Privacy policy Terms and conditions