You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Priya Sharma (Jira)" <ji...@apache.org> on 2020/06/02 05:54:00 UTC

[jira] [Commented] (OFBIZ-11762) Use GroovyBaseScript's logging utility methods instead of using Debug in each Groovy files

    [ https://issues.apache.org/jira/browse/OFBIZ-11762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17123365#comment-17123365 ] 

Priya Sharma commented on OFBIZ-11762:
--------------------------------------

Hello Pawan & All,

While working on this task I encountered some files which had logs like -
{code:java}
     String errMsg = "Failure in operation, rolling back transaction"
     Debug.logError(e, errMsg, module)

// eg. applications/party/groovyScripts/visit/ShowVisits.groovy{code}
In such cases would it wise to just use
{code:java}
 logError(e.getMessage()) {code}
or
We should enhance the GroovyBaseScript's utility and overload the logError method, to honour the exception message along with the custom message.
{code:java}
logError(e, message){code}

Looking forward to your views.

 

 

> Use GroovyBaseScript's logging utility methods instead of using Debug in each Groovy files
> ------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-11762
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11762
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Pawan Verma
>            Assignee: Priya Sharma
>            Priority: Minor
>
> Use GroovyBaseScript's logging utility methods instead of using Debug in each Groovy files
> *Currently used:* Debug.logError(MESSAGE)
> *Proposed Use:* logError(MESSAGE)
>  
> It will benefit us to remove the module from each groovy file as it is already handled in GroovyBaseScript. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)