• 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 pass security cloudflare server with php curl

Add 2 Webcam in one page with WebcamJS

I want to store data in new index as per my key in php [duplicate]

Sum array values of a column within each column of an array with 3 levels

calling server using nusoap with complextype

Log a user out of a website when they put their computer to sleep

generating a random code in php?

Using PHP to connect to a remote MSSQL database

Is it possible to change the table name in the migration file-laravel

phpunit - testing is painfully slow

Laravel: HTML in notification

PHP Array split string and Integers

how to remove white space in select 2

If you intend you use SMTP, add your SMTP Code after this Line

Laravel set default language not working

About Contact Privacy policy Terms and conditions