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/03 07:39:00 UTC

[jira] [Comment Edited] (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=17124710#comment-17124710 ] 

Priya Sharma edited comment on OFBIZ-11762 at 6/3/20, 7:38 AM:
---------------------------------------------------------------

Hello All,

I have one more concern regarding this improvement. 
 Using these methods for logging might make it difficult for one to identify where the log was printed or which class is to be blamed.

As the GroovyBaseScript's module references its own class name, the currently executing class's name will not be available in the logs.

For example -

with Debug.logError and custom module
 ------------------------------------------------
{code:java}
     [java] 2020-06-03 12:27:18,552 |ttp-bio-8443-exec-10 |HEADERFOOTER                  |E| log this========================= 
{code}
using the logError method
 -------------------------------------
{code:java}
     [java] 2020-06-03 12:27:58,628 |http-bio-8443-exec-5 |GroovyBaseScript              |E| log this========================= 
{code}
Please provide your feedback.


was (Author: priya.sharma.9362):
Hello All,

I have one more concern regarding this improvement. 
Using these methods for logging might make it difficult for one to identify where the log was printed or which class is to be blamed.

As the GroovyBaseScript's module references its own class name, the currently executing class's name will not be available in the logs.

For example -

with Debug.logError and custom module
------------------------------------------------
     [java] 2020-06-03 12:27:18,552 |ttp-bio-8443-exec-10 |HEADERFOOTER                  |E| log this=========================

using the logError method
-------------------------------------
     [java] 2020-06-03 12:27:58,628 |http-bio-8443-exec-5 |GroovyBaseScript              |E| log this=========================

Please provide your feedback.

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