Unusual logging pattern in Visit Handler

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

Unusual logging pattern in Visit Handler

Aditya Sharma
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:





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
Plot no. 80, Scheme no. 78 Part 2, Near Brilliant Convention Center, Indore, M.P 452010
Linkedin: Aditya Sharma

Reply | Threaded
Open this post in threaded view
|

Re: Unusual logging pattern in Visit Handler

Aditya Sharma
Here is the link of the image:


Thanks and Regards,
Aditya Sharma | Enterprise Software Engineer
Plot no. 80, Scheme no. 78 Part 2, Near Brilliant Convention Center, Indore, M.P 452010
Linkedin: Aditya Sharma



On Sat, Apr 27, 2019 at 2:15 PM Aditya Sharma <[hidden email]> 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:





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
Plot no. 80, Scheme no. 78 Part 2, Near Brilliant Convention Center, Indore, M.P 452010
Linkedin: Aditya Sharma

Reply | Threaded
Open this post in threaded view
|

Re: Unusual logging pattern in Visit Handler

Jacques Le Roux
Administrator
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 <[hidden email] <mailto:[hidden email]>> 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/>
>