-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Yii2 Application Development Cookbook
By :

If you have created a complex application part and want to use it with some degree of customization in your next project, most probably you need to create a module. In this recipe, we will see how to create an application log view module.
Create a new yii2-app-basic
application using the composer, as described in the official guide at http://www.yiiframework.com/doc-2.0/guide-start-installation.html.
Let's do some planning first.
In yii2-app-basic
with default configuration, all log entries are stored in the runtime/logs/app.log
file. We can extract all messages from this file with help of regular expressions and display them on the GridView widget. Besides, we must allow the user to configure the path to the custom log file.
Carry out the following steps:
Create the modules/log
directory and create the Module
class with the new file option:
<?php namespace app\modules\log; class Module extends \yii\base\Module { public $file = '@runtime/logs...
Change the font size
Change margin width
Change background colour