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

Bug 217646

Summary: [logview] investigate TPTP log adapter for Eclipse logs
Product: [Eclipse Project] PDE Reporter: Jacek Pospychala <jacek.pospychala>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: andrew.ferguson, apnan, caniszczyk, celek, deboer
Version: 3.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug
Bug Depends on: 217644    
Bug Blocks:    
Attachments:
Description Flags
first shot
none
log_grammar
none
screenshot none

Description Jacek Pospychala CLA 2008-02-04 04:12:15 EST
User picks two events and clicks "Compare Each Other" from popup menu.
We could either reuse Compare stuff and show text diffefences, or
utilize new event details editor (bug 217644) and compare events more structurally (session/event details/stack trace).

I always grudged Compare team their neat "Compare with -> Each Other" thing.
(http://eclipser-blog.blogspot.com/2007/07/compare-folders-on-windows.html)
Comment 1 Jacek Pospychala CLA 2008-02-04 04:12:54 EST
...later we could compare log sessions
Comment 2 Chris Aniszczyk CLA 2008-02-04 09:46:45 EST
now we're getting fancy and possibly competing with TPTP :)
Comment 3 Jacek Pospychala CLA 2008-02-04 16:13:03 EST
see:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=217644#c10

ok it's wrong way :)

I think what we need is Eclipse logs adapter for TPTP stuff.
They have defaults for Apache, and few others...
Comment 4 Jacek Pospychala CLA 2008-02-13 12:31:58 EST
adding Alex from TPTP, who declared to comment eventual impl. and suggested to place this in TPTP.
Comment 5 Jacek Pospychala CLA 2008-03-09 16:47:10 EDT
Created attachment 91994 [details]
first shot

Attached is project to be imported to Eclipse with static log adapter for Eclipse .log files.
It's early version, so what works:
- session, entry, subentry elements are processed with most of their attributes.
- importing a .log file using TPTP's "Import... -> Log file"
- correlating two or more .log files by time

What doesn't work
- session attributes (like eclipse.buildId, java.fullversion, etc.) are not read - but that's simple
- when Parser calls readALine() for first time, it always gets a string composed of ~65000 zeros, like [0,0,0,0,0,0......] - but it looks like TPTP issue (I use 4.3.0)
- associations between events don't work, however I don't know why yet.
When processing a Session, I cache it in parser local field.
In next parseEvent() call, during processing Entry, I do following to add this entry to cached session:
session.addAssociatedEvent("pde_log", AssociationEngine.TYPE_CONTAIN, Guid.generate(), new String[] {event.getGlobalInstanceId() } );

which seems to work, but later in Log View, I don't see these associations.
Comment 6 Jacek Pospychala CLA 2008-03-09 16:49:11 EDT
Created attachment 91995 [details]
log_grammar

Simple .log file grammar for reference. Eclipse log is generated by  org.eclipse.core.runtime.adaptor.EclipseLog class.
Comment 7 Jacek Pospychala CLA 2008-03-09 16:56:06 EDT
Created attachment 91996 [details]
screenshot

here's how it looks like....
Comment 8 Jacek Pospychala CLA 2008-03-09 16:58:55 EDT
so next steps:
I'll keep testing and improving adapter usability
but all your comments are welcome :)
Comment 9 Christophe Elek CLA 2008-03-19 09:09:59 EDT
Jacek, you want us to test with the code in comment #5 ?
Comment 10 Jacek Pospychala CLA 2008-03-19 10:06:26 EDT
(In reply to comment #9)
> Jacek, you want us to test with the code in comment #5 ?

sure, give it a try.
I'm all ears to your comments.
Comment 11 Jacek Pospychala CLA 2008-05-27 10:24:14 EDT
*** Bug 234150 has been marked as a duplicate of this bug. ***
Comment 12 Eclipse Webmaster CLA 2019-09-06 16:14:52 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 13 Julian Honnen CLA 2019-09-09 02:46:22 EDT
Please remove the stalebug flag, if this issue is still relevant and can be reproduced on the latest release.