[
https://issues.apache.org/jira/browse/OFBIZ-11762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17124768#comment-17124768 ]
Pawan Verma commented on OFBIZ-11762:
-------------------------------------
Hi Priya,
This is because of the current module. It always uses GroovyBaseScript.
{code:java}
public static final String module = GroovyBaseScript.class.getName()
{code}
One solution might be to use current class name of the groovy script running. We can implement something like:
{code:java}
String getModule() {
return this.class.getName()
}
{code}
and use this getModule() method as needed, like:
{code:java}
def logError(String message) {
Debug.logError(message, getModule())
}
{code}
Everyone, please suggest your thoughts. Thanks!
> 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)