• 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

Center point of multiple gps coordinates with php

Add 2 Webcam in one page with WebcamJS

Show only featured products in Woocommerce shop page

Laravel dosen't connect with Oracle

Composer Curl error 60: SSL certificate problem: unable to get local issuer certificate

PHP if in_array() how to get the key as well?

Where do I need to place a hook for phpunit?

Sum column values from multiple arrays

How to check user Permissions using Custom Middleware in Laravel

How do I pass the dynamic output of a php variable or php function to a CSS variable?

Using array_intersect on a multi-dimensional array

Session timeout in Yii2

php curl_exec() Connection refused when retrieving a remote image

PHPExcel How to set conditional formatting to change cell background color based on cells values

Symfony Error: "An exception has been thrown during the rendering of a template"

About Contact Privacy policy Terms and conditions