• 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

Cut an arabic string

WordPress Subquery returns more than 1 row on SELECT

Installing Composer - Internal Error

generating a random code in php?

How to use functions that are declared in snippets in Evolution CMS (Modx) in an external PHP Script?

Add 2 Webcam in one page with WebcamJS

CodeIgniter extend CI_URI undefined method

google content api for shopping

dockerizing Laravel + vue

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

I want to display a sweetalert after the inserting of data in my database

Remove categories with all childs derived from parent category

Python - Include another Python script

Inserting Country Selection into MySQL PHP [duplicate]

How do I remove this delivery notification from here?

About Contact Privacy policy Terms and conditions