• 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 see if database exists with PDO [duplicate]

Dropzone: Submit both form data and dropzone at once

Two buttons one form

How to fix this error : Ask your hosting provider to use PHP 7.2.5 or higher for both HTTP and CLI?

How to get the total hour from starting time to end time in php

How to Make Laravel Eloquent "IN" Query?

Applying programmatically a coupon to an Order in WooCommerce3

Check If array is null or not in php

Add New Parameter to Existing URL using htaccess

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

How can I make good efficent AJAX live forms with just jQuery and

How to run a shell as root from php (apache)

laravel 5.6 bulk inserting json data

Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: ) in Unknown on line 0

How to disable only_full_group_by option in Laravel

About Contact Privacy policy Terms and conditions