You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Aditya Sharma <ad...@hotwaxsystems.com> on 2019/04/27 08:45:56 UTC

Unusual logging pattern in Visit Handler

Hello everyone,

While exploring VisitHander.java, I observed that for logging the pattern
followed is:

Debug.logInfo(new Exception(), Error Message, module);

due to which we get a long stack trace like this:

[image: image.png]



Is there a specific reason for using such a pattern?

I think we should follow the standard pattern only as this may populate log
files with hefty logs. Though I can only find 3 such traces. I propose to
replace this with the standard pattern:

Debug.logInfo( Error Message, module);

WDYT?

--
Thanks and Regards,
*Aditya Sharma* | Enterprise Software Engineer
HotWax Systems <http://www.hotwaxsystems.com/>
Plot no. 80, Scheme no. 78 Part 2, Near Brilliant Convention Center, Indore,
M.P 452010
Linkedin: *Aditya Sharma* <https://www.linkedin.com/in/aditya-p-sharma/>

Re: Unusual logging pattern in Visit Handler

Posted by Jacques Le Roux <ja...@les7arts.com>.
I agree, I see no reason for a too long stack trace (ever)

There are 2 other such instances

Jacques

Le 27/04/2019 à 10:54, Aditya Sharma a écrit :
> Here is the link of the image:
>
> https://drive.google.com/file/d/0B27ZznUMte3BbWkxZVdsMU54NVNBTVBuSU9wczVwWVdaOVpn/view?usp=sharing
>
> Thanks and Regards,
> *Aditya Sharma* | Enterprise Software Engineer
> HotWax Systems <http://www.hotwaxsystems.com/>
> Plot no. 80, Scheme no. 78 Part 2, Near Brilliant Convention Center, Indore, M.P 452010
> Linkedin:*Aditya Sharma* <https://www.linkedin.com/in/aditya-p-sharma/>
>
>
>
> On Sat, Apr 27, 2019 at 2:15 PM Aditya Sharma <aditya.sharma@hotwaxsystems.com <ma...@hotwaxsystems.com>> wrote:
>
>     Hello everyone,
>
>     While exploring VisitHander.java, I observed that for logging the pattern followed is:
>
>     Debug.logInfo(new Exception(), Error Message, module);
>
>     due to which we get a long stack trace like this:
>
>     image.png
>
>
>
>     Is there a specific reason for using such a pattern?
>
>     I think we should follow the standard pattern only as this may populate log files with hefty logs. Though I can only find 3 such traces. I
>     propose to replace this with the standard pattern:
>
>     Debug.logInfo( Error Message, module);
>
>     WDYT?
>
>     --
>     Thanks and Regards,
>     *Aditya Sharma* | Enterprise Software Engineer
>     HotWax Systems <http://www.hotwaxsystems.com/>
>     Plot no. 80, Scheme no. 78 Part 2, Near Brilliant Convention Center, Indore, M.P 452010
>     Linkedin:*Aditya Sharma* <https://www.linkedin.com/in/aditya-p-sharma/>
>

Re: Unusual logging pattern in Visit Handler

Posted by Aditya Sharma <ad...@hotwaxsystems.com>.
Here is the link of the image:

https://drive.google.com/file/d/0B27ZznUMte3BbWkxZVdsMU54NVNBTVBuSU9wczVwWVdaOVpn/view?usp=sharing

Thanks and Regards,
*Aditya Sharma* | Enterprise Software Engineer
HotWax Systems <http://www.hotwaxsystems.com/>
Plot no. 80, Scheme no. 78 Part 2, Near Brilliant Convention Center, Indore,
M.P 452010
Linkedin: *Aditya Sharma* <https://www.linkedin.com/in/aditya-p-sharma/>



On Sat, Apr 27, 2019 at 2:15 PM Aditya Sharma <
aditya.sharma@hotwaxsystems.com> wrote:

> Hello everyone,
>
> While exploring VisitHander.java, I observed that for logging the pattern
> followed is:
>
> Debug.logInfo(new Exception(), Error Message, module);
>
> due to which we get a long stack trace like this:
>
> [image: image.png]
>
>
>
> Is there a specific reason for using such a pattern?
>
> I think we should follow the standard pattern only as this may populate
> log files with hefty logs. Though I can only find 3 such traces. I propose
> to replace this with the standard pattern:
>
> Debug.logInfo( Error Message, module);
>
> WDYT?
>
> --
> Thanks and Regards,
> *Aditya Sharma* | Enterprise Software Engineer
> HotWax Systems <http://www.hotwaxsystems.com/>
> Plot no. 80, Scheme no. 78 Part 2, Near Brilliant Convention Center,
> Indore, M.P 452010
> Linkedin: *Aditya Sharma* <https://www.linkedin.com/in/aditya-p-sharma/>
>
>