• 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 and WebView - Cookie doesn't are the same

Limit login attempts in Laravel 5.7

GRPC installed successfully on ubuntu but php is looking for it in another folder

Exact alternate to mcrypt_encrypt in PHP 7.2

Currently Using CodeIgniter Framework i have an Error

How to render html from a @foreach loop in a textarea

Check for PDO Results, If None Display Message, If Yes then Loop Through

MySQL order by field in Eloquent

Passing a boolean value from checkbox in Laravel form

PHP: set a (deep) array key from an array [closed]

how to retrieve the first and last instance of a row in pdo dataset

Adding one microsecond to Datetime object in PHP

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

Laravel display validation error

PHP array sort and remove duplicates by two field values

About Contact Privacy policy Terms and conditions