• 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

Log file is not being written in Laravel 5.5

How to separate letters and digits from a string in php

AJAX call fails with SyntaxError: Unexpected end of JSON input

How to get AJAX to post on second page?

How to use React Router with Laravel?

Transfer data between JavaScript and PHP through JSON

Unable to match results of php hash_hmac() and coldfusion hmac()

Laravel Nova Dependency Container what are the allowed resource properties other than id in dependsOn

How do I upload a laravel project on cPanel shared hosting?

Implode array with array of glue strings

(Cache::lock()) -> get() -- Under what conditions does it return false?

Unable to Edit config.inc.php

Laravel get user data with profile

Distribute array row data to make multiple new rows

could not find driver Debian SQL Server PHP

About Contact Privacy policy Terms and conditions