• 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

What is the difference between client-side and server-side programming?

stay with the last 15 elements of an array [duplicate]

Store multiple fields in JSON column (Nova CMS)

Multiply each value in array using array_map function

Detect a fetch request in PHP

Mobile browsers are adding .html to filename on download

how to fix Service provider class not found when using repository?

How to separate letters and digits from a string in php

Problems getting instance of UploadedFile in Yii2

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

Laravel PackageManifest.php: Undefined index: name

woocommerce change position of price

target [LaravelFortifyContractsRegisterViewResponse] is not instantiable

Laravel Factory not calling callback 'afterCreating'

Laravel: HTML in notification

About Contact Privacy policy Terms and conditions