• 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

Invalid value in field "itemtype" in Google Search Console

Sentry on Symfony: how to exclude `NotFoundHttpException`

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

Match csv filenames to table names and import

How to test laravel controller method?

SendGrid: Sending an email to multiple recipients without other emails being shown on the "to" field

AJAX call fails with SyntaxError: Unexpected end of JSON input

No result using makeStyles Material UI in react 18

Google API Heatmap Layer exception, why?

How to pass data to all views in Laravel 5?

Is it possible to change the table name in the migration file-laravel

How to show selected value using javascript in laravel

Adding reCAPTCHA v2 into my PHP file

Navigation idle on content download

"Unable to load dynamic library 'pdo_sqlsrv.so' "Cenos7 PHP7.2.10

About Contact Privacy policy Terms and conditions