• 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 8 factory state afterCreating

Open a popup box after receiving result from ajax

ldap is missing from system when installing adldap2 in laravel

How to make a array inside array?

Symfony autowiring issues since docker update

PHP mail function is sending blank message body

Sum column values from multiple arrays

Laravel database insert with combining array and string

Laravel Jetsream Profile page not loading on fresh install

Laravel You requested 1 items, but there are only 0 items available

PHP Slim Framework request using withAttribute error

Laravel Sanctum CSRF not authenticating

Create a zip file and download it

Connecting an HTML webpage to a SQL Server

Require a class from another class - php

About Contact Privacy policy Terms and conditions