• 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

php 7 php.ini upload_max_filesize not working

Call authenticate manually in router middleware

What is the function of the (new Date()).getTime() in PHP?

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

Performance of foreach, array_map with lambda and array_map with static function

Facebook API, get page post link (PHP)

How to send upload image through email

How to implement placeholder in a php file for moodle plugin?

500 (Internal Server Error) with Laravel & Docker [duplicate]

Laravel Factory not calling callback 'afterCreating'

Laravel Passport - Not able to get token string in response?

PHP returning an error message and false

Attempt to read property "view" on null when sending password reset email

How to add a sidebar to Woocommerce Shop Page?

PHP error: "The zip extension and unzip command are both missing, skipping."

About Contact Privacy policy Terms and conditions