svn commit: r1750336 - /ofbiz/trunk/framework/webtools/groovyScripts/log/LogView.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1750336 - /ofbiz/trunk/framework/webtools/groovyScripts/log/LogView.groovy

pranayp
Author: pranayp
Date: Mon Jun 27 13:53:24 2016
New Revision: 1750336

URL: http://svn.apache.org/viewvc?rev=1750336&view=rev
Log:
[OFBIZ-7575] Fixed styling issue on Logs in LogView, as none was being applied.
As per updated code now-
INFO will be shown in Green color
WARNING will be in bold Blue color
ERROR will be in Red color along with border
DEBUG will be in Grey color
Thanks Swapnil M Mane for reporting the issue and providing the patch.

Modified:
    ofbiz/trunk/framework/webtools/groovyScripts/log/LogView.groovy

Modified: ofbiz/trunk/framework/webtools/groovyScripts/log/LogView.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/groovyScripts/log/LogView.groovy?rev=1750336&r1=1750335&r2=1750336&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/groovyScripts/log/LogView.groovy (original)
+++ ofbiz/trunk/framework/webtools/groovyScripts/log/LogView.groovy Mon Jun 27 13:53:24 2016
@@ -24,13 +24,13 @@ try {
     File logFile = FileUtil.getFile(logFileName);
     logFile.eachLine { line ->
         type = '';
-        if (line.contains(":INFO ] ")) {
+        if (line.contains(" |I| ")) {
             type = 'INFO';
-        } else if (line.contains(":WARN ] ")) {
+        } else if (line.contains(" |W| ")) {
             type = 'WARN';
-        } else if (line.contains(":ERROR] ")) {
+        } else if (line.contains(" |E| ")) {
             type = 'ERROR';
-        } else if (line.contains(":DEBUG] ")) {
+        } else if (line.contains(" |D| ")) {
             type = 'DEBUG';
         }
         logLines.add([type: type, line:line]);