• 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

Open a popup box after receiving result from ajax

Cannot connect to own websocket server when on secured domain

php script to delete files older than 24 hrs, deletes all files

Hide email address with stars (*)

Why isn't my PHP exception working?

Error converting docx to pdf using Unoconv

PHP Fatal error: Class not found - PHPUnit

How to submit the custom form data in database in WordPress without plugin using ajax?

How to keep value of selected value after form submission?

Php - Sum up the numbers in an array one by one

jQuery Ajax Post with data

browsersync doesn't work with XAMPP

Laravel MSSQL Server Connection not working

Fatal error: Array callback has to contain indices 0 and 1

Assign output of PHP function to a variable

About Contact Privacy policy Terms and conditions