• 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

Laravel display validation error

Laravel whole batch is cancelled if one Job fails

Form Validation and Submission to database

Can I write PHP code across multiple lines per statement?

How to auto populate preferredCountries from intl-tel-input with db output

How to show selected value using javascript in laravel

merge all files in directory to one text file

Utf8 encoding issue with Laravel

Laravel Get Days In Month From Month Number?

Laravel/ PHP: Order By Alphabetical with numbers in order [duplicate]

Laravel 5 controller sending JSON integer as string

PHP Include for HTML?

error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

Encrypt in php and decrypt in Dart(flutter)

Pass an image through AJAX [duplicate]

About Contact Privacy policy Terms and conditions