• 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

Get sql.h error on MacOS 12 (Monterey) sqsrv and pdo_sqsrv drive installation

Cant seem to get the Pagination to work on my WooCommerce REST API application?

Group data in a multidimensional array based on two columns

target [LaravelFortifyContractsRegisterViewResponse] is not instantiable

How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

how to search for a file with php

api response laravel doesn't show

Issue with laravel eloquent model property

Handling expired token in Laravel

How do I call a php file with axios?

Adding multiple items to WooCommerce cart at once

How to Display Data in Yajra Datatables Laravel 7?

How do I truncate a decimal in PHP?

Woocommerce redirect after add-to-cart error

XSS attack still works despite htmlspecialchars() doing its work

About Contact Privacy policy Terms and conditions