• 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

phpseclib 2.0 can not use Composer to create autoload

how to search for a file with php

Select option menu read from database and use it's values

Composer Warning: openssl extension is missing. How to enable in WAMP

Multiply each value in array using array_map function

Backend cannot be reached after Typo3 login screen

PHP Startup: Unable to load dynamic library 'openssl' in Ubuntu

Google Calendar API batch request PHP

advanced custom fields wordpress custom class

Statement that checks whether a URL contains a particular path?

How to display MySQL table using php and edit it in a web browser

Make Shipping Method fields Mandatory on Woocommerce checkout page

If action is on a different page do I use fwrite function

how to loop through json response data using ajax jquery?

SQL to convert multiple rows into a single row of variable length

About Contact Privacy policy Terms and conditions