• 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 get company posts from LinkedIn via API?

PHPExcel_IOFactory::createWriter causes wrong behaviour

Laravel 8 factory state afterCreating

I want a way to give path to my files which are outside of public folder in laravel

Adding reCAPTCHA v2 into my PHP file

GA4 custom event from server side, can someone tell me how i can do the following code in php?

PHP sort array of objects by two properties

PHP: How to quickly split a key=value file into associative array

Limit WooCommerce products in cart only from one custom taxonomy

Check if string contains a value in array [duplicate]

Generate random username based on full name php

JSON Render Issue in Date Object Laravel and PHP 7.4

protect images from being copied

php: command not found Command PhaseScriptExecution failed with a nonzero exit code

Printing more than one array using print_r or any other function in php

About Contact Privacy policy Terms and conditions