• 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

Saving Data from form to database using AngularJS and php

insert multiple rows in a saveall in cakephp

Project structure for PHP

Pages are working fine on localhost but not running on the hosting server

Magento 2 - Controller returning blank page

Can't find vendor/autoload.php for Ratchet

How in Laravel run JavaScript code stored in php variable?

Can't call javascript alert alertify library from PHP

Transpose multidimensional array and join values with commas

How to set a domain name with php artisan serve

Error converting docx to pdf using Unoconv

Querying only one row from a one to many relationship laravel

How to add a custom field to all Woocommerce attribute terms using add_action

How to show selected value using javascript in laravel

Laravel Carbon throws error The format separator does not match

About Contact Privacy policy Terms and conditions