Skip to content

Commit a85887e

Browse files
committed
Merge branch 'release/1.4.0'
2 parents 2b00628 + a043863 commit a85887e

File tree

19 files changed

+323
-19
lines changed

19 files changed

+323
-19
lines changed

README.md

Lines changed: 159 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
FireGento_Core
1+
FireGento_Debug
22
=====================
33
This extension provides some debbuging functionality for Magento.
44

55
Facts
66
-----
7-
- version: 1.3.0
7+
- version: 1.4.0
88
- [extension on GitHub](https://github.com/firegento/firegento)
99

10+
1011
Description
1112
-----------
1213
This extension provides some debugging functionality for Magento.
1314
This includes:
15+
1416
- List all installed modules incl. their dependencies in the Magento backend
1517
- Activate/Deactivate non-core modules via the Magento backend
1618
- Check all installed modules for rewrite conflicts
@@ -19,6 +21,161 @@ This includes:
1921
- Show detailed system information in the backend
2022
- Provide logging interfaces for [ChromePhp](http://www.chromephp.com/), [FirePHP](http://www.firephp.org/) and [Firelogger](http://firelogger.binaryage.com/)
2123

24+
## Installation
25+
Install the files using one of the following methods:
26+
### Via modman
27+
- Install [modman](https://github.com/colinmollenhour/modman)
28+
- Use the command from your Magento installation folder: `modman clone https://github.com/firegento/firegento-debug.git`
29+
30+
### Via composer
31+
- Install [composer](http://getcomposer.org/download/)
32+
- Create a composer.json into your project like the following sample:
33+
34+
```json
35+
{
36+
...
37+
"require": {
38+
"firegento/debug":"*"
39+
},
40+
"repositories": [
41+
{
42+
"type": "composer",
43+
"url": "http://packages.firegento.com"
44+
}
45+
],
46+
"extra":{
47+
"magento-root-dir": "./"
48+
}
49+
}
50+
51+
```
52+
53+
- Then from your composer.json folder: `php composer.phar install` or `composer install`
54+
55+
### Manually
56+
You can copy the files from the 'src' folder of this repository to the same folders of your installation
57+
58+
Once the files are installed:
59+
60+
- Clear the cache, logout from the admin panel and then login again.
61+
62+
A new Menu item named "**FIREGENTO**" will appear in the admin area
63+
64+
## Logging functionality
65+
This module exposes some logging functionality for use in your own extensions.
66+
67+
You can:
68+
69+
- log data to a file that you specify in the configuration
70+
- log data to the browser using either: [ChromePhp](http://www.chromephp.com/), [FirePHP](http://www.firephp.org/) or [Firelogger](http://firelogger.binaryage.com/)
71+
72+
The extension can be configured under FIREGENTO > Configuration
73+
74+
![image](doc/img/configuration.png)
75+
76+
Here you can change the name of the log file which will be written (by default firegento.log) if you select "Force Logging" then the log file will be written to irrespective of the the configuration setting to enable logging "Developer > Log Settings > Enabled".
77+
78+
### Usage
79+
80+
#### Log information to file:
81+
82+
```
83+
$product = Mage::getModel('catalog/product');
84+
Mage::helper('firegento/log')->log($product->debug());
85+
```
86+
This statement will take the output of `$product->debug()` and log it to the configured file.
87+
88+
There is also a utilty method available `debug()` you can use this method to log large objects such as sales/quote, sales/order or other objects which are instances of Varien_Object internally the debug() method of this object will be called, and the output logged to using `FireGento_Debug_Helper_Log::log()`
89+
90+
```
91+
$object = Mage::getModel('sales/order')->load(XXX);
92+
Mage::helper('firegento/log')->debug($object);
93+
```
94+
95+
#### Log information to the browser
96+
It is also possible to send the output of the logging to the browser and have it displayed by [ChromePhp](http://www.chromephp.com/), [FirePHP](http://www.firephp.org/) or [Firelogger](http://firelogger.binaryage.com/) in order to do this, you must make sure that you have enabled the appropriate option in the configuration, and then you can simply use one of the following statements:
97+
98+
```
99+
$product = Mage::getModel('catalog/product');
100+
101+
// log to chromephp
102+
Mage::helper('firegento/log')->chromephp($product->debug());
103+
104+
// log to firelogger
105+
Mage::helper('firegento/log')->firelogger($product->debug());
106+
107+
// log to firephp
108+
Mage::helper('firegento/log')->firephp($product->debug());
109+
```
110+
You will then see something like these images in the browser extensions:
111+
112+
![debug view 1](doc/img/debug_browser1.png)
113+
![debug view 2](doc/img/debug_browser2.png)
114+
115+
116+
## Admin Functionality
117+
The functionality can be accessed via the "**FIREGENTO**" menu item.
118+
119+
![Firegento menu](doc/img/menu_firegento.png "Firegento menu")
120+
121+
### Diagnostic > Check Modules
122+
Here all the installed modules including their dependencies are listed.
123+
![image](doc/img/diagnostic_checkmodules.png)
124+
125+
You will see:
126+
127+
- The modules Namespace and name
128+
- the code pool to which it belongs
129+
- the current status
130+
- the path to the extension in the filesystem
131+
- if the path exists or not
132+
- if the config.xml exists
133+
- the version of the extension
134+
- any dependencies defined for the extension
135+
136+
Non system extensions can be activated/decativated by clicking on the link in the Action column.
137+
138+
### Diagnostic > Check Rewrites
139+
140+
A convenient overview of rewritten classes is displayed here.
141+
When a classpath is overwritten by an extension, you will see the name of the class which overrides it, and the name of the active class for that classpath. In the case of a rewrite conflict the status column displays a red "not ok" status. You will see that the Active class differs from the rewrite class.
142+
143+
144+
![Non conflicted rewrite](doc/img/rewrite_ok.png "Non conflicted rewrite")
145+
In the image above the classpath core/email_template is succesfully overwritten.
146+
147+
![Conflicted rewrite](doc/img/rewrite_conflict.png "Conflicted rewrite")
148+
Here there is a rewrite conflict, and the rewrite which is not active is shown with a red "not ok" status
149+
150+
there is a file called firegento.php which you can install in the root of your magento instance, this allows you to check the status of rewrites without installing the whole Firegento_Debug extension.
151+
152+
### Diagnostic > Check Events
153+
This allows you to see all events in your system and which observers are listening for them. When more than one observer is bound to the event, then they are listed under each other, in the column "Location"
154+
155+
![observers bound to events](doc/img/diagnostic_checkevents.png "observers bound to events")
156+
157+
### Diagnostic > Check System
158+
Here you will see information about the system, which is divided into 5 areas:
159+
160+
- Magento Information
161+
- PHP Information
162+
- MySQL Information
163+
- Server Information
164+
- System Requirements
165+
166+
![System information](doc/img/diagnostic_checksystem.png "System information")
167+
168+
### Diagnostic > phpinfo()
169+
The output of the phpinfo() function is displayed here
170+
171+
172+
### Logs
173+
The log viewer allows you to select a log file to open, you will be able to see in real time in a console like window as entries are written.
174+
175+
![Log file console like viewer](doc/img/logs.png "Log file console like viewer")
176+
177+
178+
22179
Requirements
23180
------------
24181
- PHP >= 5.3.0
@@ -28,12 +185,6 @@ Compatibility
28185
- Magento >= 1.5
29186
- Versions below are not actively tested but should work without problems
30187

31-
Installation Instructions
32-
-------------------------
33-
1. Install the extension by copying all the extension files into your document root.
34-
2. Clear the cache, logout from the admin panel and then login again.
35-
3. You can now access all features over the the Tab "FIREGENTO" in the Magento backend
36-
37188
Support
38189
-------
39190
If you have any issues with this extension, open an issue on [GitHub](https://github.com/firegento/firegento-debug/issues).

doc/img/configuration.png

68.7 KB
Loading

doc/img/debug_browser1.png

113 KB
Loading

doc/img/debug_browser2.png

81.8 KB
Loading

doc/img/diagnostic_checkevents.png

31.2 KB
Loading
79.3 KB
Loading

doc/img/diagnostic_checksystem.png

177 KB
Loading

doc/img/logs.png

27.6 KB
Loading

doc/img/menu_firegento.png

25.7 KB
Loading

doc/img/rewrite_conflict.png

31 KB
Loading

0 commit comments

Comments
 (0)