You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Leon Torres (JIRA)" <ji...@apache.org> on 2007/07/23 19:05:32 UTC

[jira] Updated: (OFBIZ-1169) Eliminate redundant log messages in screen widgets

     [ https://issues.apache.org/jira/browse/OFBIZ-1169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leon Torres updated OFBIZ-1169:
-------------------------------

    Attachment: screenwidget-log-fix.patch

This patch provides two major improvements to the readability of screen widget logs.

1.  The render screen function is recursive in nature, and each render step will log every error.  Most of these errors get thrown up to the previous render function, which causes them to get logged again.  This is the primary reason that the log file explodes with messages.

To fix it, I introduced a special exception called ScreenRenderException which tells the rendering function that the particular error was already caught and logged, so it can just pass it up the chain.

2.  HtmlWidget.java was throwing a RuntimeException, which pollutes the user's screen with a lot of error information.  Instead of throwing RuntimeException, just render the error message directly to the screen.  This is much more useful as it prints exactly what the error was and nothing more, allowing you to fix typos in the FTL much faster.

> Eliminate redundant log messages in screen widgets
> --------------------------------------------------
>
>                 Key: OFBIZ-1169
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1169
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Leon Torres
>             Fix For: SVN trunk
>
>         Attachments: screenwidget-log-fix.patch
>
>
> Currently, if you have a typo or minor bug in a bsh or ftl file that is part of a screen widget definition, the resulting error message in the log and on screen can be overwhelming.  This causes a serious usability issue with developers and new users.
> I decided to spend some personal time to see what the source of the log "explosion" is and how it can be fixed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.