• 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

Convert every two values of an associative array into key-value pairs

Whats the point of running Laravel with the command 'php artisan serve'?

Why do I have invalid argument supply for foreach in Laravel for json response? [duplicate]

Installing Composer - Internal Error

Execute only one time and then wait set period of time before executing again

Load a .env file with PHP

passwordless LDAP login and get user information using Kerberos ticket in PHP

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

Laravel 5.1 Unknown database type enum requested

Need to display only array value in JSON output

Laravel Unknown Column 'updated_at'

Target class controller does not exist - Laravel 8

How to convert a carbon into string, to take the date only?

PHP Array split string and Integers

How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

About Contact Privacy policy Terms and conditions