Add option to enable/disable logging. #6

Closed
wants to merge 1 commit into
from
View
4 app/code/local/Aoe/JsCssTstamp/Model/Package.php
@@ -281,7 +281,9 @@ protected function _prepareUrl($uri) {
}
if ($this->addTstampToAssets) {
- Mage::log('Aoe_JsCssTsamp: ' . $uri);
+ if (Mage::getStoreConfigFlag('dev/log/aoeJsCssTstampActive')) {
+ Mage::log('Aoe_JsCssTstamp: ' . $uri);
+ }
$matches = array();
if (preg_match('/(.*)\.(gif|png|jpg)$/i', $uri, $matches)) {
$uri = $matches[1] . '.' . $this->getVersionKey() . '.' . $matches[2];
View
3 app/code/local/Aoe/JsCssTstamp/etc/config.xml
@@ -67,6 +67,9 @@
<storage>file</storage>
<addTstampToAssets>0</addTstampToAssets>
</css>
+ <log>
+ <aoeJsCssTstampActive>1</aoeJsCssTstampActive>
+ </log>
</dev>
</default>
View
13 app/code/local/Aoe/JsCssTstamp/etc/system.xml
@@ -78,6 +78,19 @@
</addTstampToAssets>
</fields>
</css>
+ <log>
+ <fields>
+ <aoeJsCssTstampActive translate="label">
+ <label>Log Aoe_JsCssTstamp messages</label>
+ <frontend_type>select</frontend_type>
+ <source_model>adminhtml/system_config_source_yesno</source_model>
+ <sort_order>100</sort_order>
+ <show_in_default>1</show_in_default>
+ <show_in_website>1</show_in_website>
+ <show_in_store>1</show_in_store>
+ </aoeJsCssTstampActive>
+ </fields>
+ </log>
</groups>
</dev>
</sections>