Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312999

Summary: Enhance OMTracer to print out detailed trace position
Product: [Modeling] EMF Reporter: Martin Fluegge <martin.fluegge>
Component: cdo.coreAssignee: Martin Fluegge <martin.fluegge>
Status: CLOSED WONTFIX QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 Flags: stepper: review-
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch v1
none
Patch v2 none

Description Martin Fluegge CLA 2010-05-15 02:42:26 EDT
It would be nice having a trace output from the OMTracer (and OMLogger) which print outs the related class as well as the line number from where the comes. This could be formatted in a way that the console interprets this output as a link and allows the developer to jump to the related line.
Comment 1 Martin Fluegge CLA 2010-07-29 04:50:53 EDT
Created attachment 175459 [details]
Patch v1

Hi Eike,

attached an idea how the change could look like. I think the result looks fine. Maybe the implementation could be improved. If you have ideas on this...let us discuss them :)
Comment 2 Martin Fluegge CLA 2011-02-07 03:02:17 EST
Eike, how about this bug? I am not sure whether we should uses the things I provided with patch1 or better llok for somethinf different. May a Log4j integration into our logging framework?

Or don't you see any necessity for enchancing the current implementation?
Comment 3 Eike Stepper CLA 2011-02-07 03:39:47 EST
(In reply to comment #2)
> Eike, how about this bug? I am not sure whether we should uses the things I
> provided with patch1 or better llok for somethinf different.

I haven't seen a review? flag :P
 
> May a Log4j integration into our logging framework?

That sentence does not parse.
Comment 4 Martin Fluegge CLA 2011-02-07 03:43:12 EST
(In reply to comment #3)
> (In reply to comment #2)
> > Eike, how about this bug? I am not sure whether we should uses the things I
> > provided with patch1 or better llok for somethinf different.
> 
> I haven't seen a review? flag :P

Here it comes ;)
> 
> > May a Log4j integration into our logging framework?
> 
> That sentence does not parse.

Understandable ;) Do not even know what is missing. :)

But what I meant was something like:

Shall we try to integrate log4J our any other logging framework to make our traces mor flexible?
Comment 5 Eike Stepper CLA 2011-02-07 03:46:43 EST
(In reply to comment #4)
> > I haven't seen a review? flag :P
> Here it comes ;)

Can't review it right now, my workspace is dirty.

> Shall we try to integrate log4J our any other logging framework to make our
> traces mor flexible?

What would be the difference? What are you missing?

A bridge should be easy to create but I'm reluctant to create new bundles for that. New non-optional external dependencies are not acceptable.
Comment 6 Martin Fluegge CLA 2011-02-07 04:19:03 EST
> What would be the difference? What are you missing?
>

It is long ago, but as far as I remember the patch relies on the call hierarchy so I am not sure whether this is the best approach. I am also not sure whether the patch is still valid. But If you try it and it works we could use it ;)
 
> A bridge should be easy to create but I'm reluctant to create new bundles for
> that. New non-optional external dependencies are not acceptable.

Agreed. Then let's take this one ;)
Comment 7 Eike Stepper CLA 2011-02-10 10:50:40 EST
I'm concerned about the performance implications. Maybe a system property should be used to make this configurable?

And I don't like the simple string concatenation of the prefix and the msg. OMTraceHandlerEvent should be enhanced instead so that the OMTraceHandler can decide whether to show it or not.

The prefix() methods should be static and somewhere central, maybe in ReflectUtil.

And it seems as if some of the pos values are not correct.

The test should be un net4j.tests.util
Comment 8 Eike Stepper CLA 2011-02-10 10:51:03 EST
Created attachment 188695 [details]
Patch v2
Comment 9 Eike Stepper CLA 2011-06-23 03:58:41 EDT
Moving all open enhancement requests to 4.1
Comment 10 Eike Stepper CLA 2012-08-14 22:52:46 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 11 Eike Stepper CLA 2012-12-30 12:16:37 EST
No activity here for almost 2 years and the performance implications haven't been clarified.