• 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

Attempted to call an undefined method named "get" of class "MailController"

Yoast SEO (WordPress Plugin) - Get plugin generated data manually

"cannot list resources" error from WooCommerce REST API

How do I enable error reporting in Laravel?

How to get array values using foreach in laravel

php script to delete files older than 24 hrs, deletes all files

How to send image,audio or video through the WhatsApp API - PHP

Use same method for inertia response and json response Laravel Jetstream

Add customer email and phone in "Order" column to admin orders list on Woocommerce

Codeigniter, Severity: error --> Exception: Too few arguments to function, admin dashboard shows HTTP error 500

Split array into 4-element chunks then implode into strings

Explode not working properly with dash

Laravel 8 Multiple Relationships for Factory

How in Laravel run JavaScript code stored in php variable?

Why i get wrong output for html markdown?

About Contact Privacy policy Terms and conditions