• 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 all WooCommerce products within own plugin

PHP mail function is sending blank message body

get folder directory from input type file - PHP

Eloquent insert id with sequence next value

Phalcon: setStatusCode returns empty response

Artisan, creating tables in database

Pass a select with mysqli_fetch_row to a table

how to remove white space in select 2

PHP code for generating decent-looking coupon codes (mix of letters and numbers)

How to Make Laravel Eloquent "IN" Query?

Add 2 Webcam in one page with WebcamJS

How do I loop through an MS SQL database with VB.NET?

How to get variable from JavaScript to PHP [duplicate]

zsh: command not found: php

Add bold text and line break into Laravel Notification Email

About Contact Privacy policy Terms and conditions