• 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

How to unlink image from folder?

Nginx RTMP not recording

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

PHPMyAdmin not working as intended at remote server. Error 500, $respond not found

Magento 2 - Controller returning blank page

How to get the ID of the link in another page in php

How to change product Image when variables are selected in Shop and Archive Pages?

How to check user Permissions using Custom Middleware in Laravel

Laravel Database Strict Mode

php echo remove slashes from url [duplicate]

How to write PHP in XSLT

disable two buttons after clicking another button

PHP using str_starts_with for array to exclude same as with wildcard

User pool client {id}does not exist

Unable to get password for the instance created from AMI

About Contact Privacy policy Terms and conditions