• 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

PHP mail sending empty mails

Render the content of default_filter.php in Joomla front-end

Combine array with same value and add other [duplicate]

Uncaught TypeError: Cannot read property 'length' of null when retrieving tags from wp

Explode not working properly with dash

php echo xml documents with header

How to redirect to another page after n seconds in wordpress without using javascript?

How to set dynamic `home` and `siteurl` in WordPress?

How to test a php login connected to a mysql db through xampp?

Extract house numbers from address string

selected value from the listbox in php

Why isn't my PHP exception working?

Statement that checks whether a URL contains a particular path?

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

Cannot connect to own websocket server when on secured domain

About Contact Privacy policy Terms and conditions