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

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

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

Nicolas Malin (Jira)

    [ 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)