• 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/HTML: Creating A SubMenu

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

Adding reCAPTCHA v2 into my PHP file

Cannot retrieve error message using Symfony HttpClient if the response is not "ok"

Laravel/docker-compose/redis - Class 'Redis' not found

Laravel database insert with combining array and string

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

Sort a multidimensional array by integer inside of a string value which is two levels down

How to keep value of selected value after form submission?

SendGrid: Sending an email to multiple recipients without other emails being shown on the "to" field

Ajax GET request fails in laravel 8

Issue saving card for customer

how to loop through json response data using ajax jquery?

correct PHP headers for pdf file download

Extract string between first whitespace and last whitespace in php

About Contact Privacy policy Terms and conditions