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

Bug 324901

Summary: [terminal][api] Add logging facility
Product: [Tools] CDT Reporter: Manuel Stahl <thymythos>
Component: terminalAssignee: Project Inbox <cdt-core-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: enhancement    
Priority: P3 CC: aleherb+eclipse, eclipse, uwe.st
Version: Next   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
This patch implements the logging facility
none
Toolbar icon none

Description Manuel Stahl CLA 2010-09-09 16:15:13 EDT
I want to add the ability to log incoming data in the terminal view to a file.
Comment 1 Manuel Stahl CLA 2010-09-09 16:22:07 EDT
Created attachment 178564 [details]
This patch implements the logging facility

Add logging to org.eclipse.tm.terminal
Add toolbar button to org.eclipse.tm.terminal.view
Comment 2 Manuel Stahl CLA 2010-09-09 16:23:09 EDT
Created attachment 178565 [details]
Toolbar icon
Comment 3 Martin Oberhuber CLA 2010-09-09 17:40:05 EDT
Nice :) 

See also bug 209875 for an earlier request for the same.

In the patch, your API addition seems to require a bit more thought though. Why do you define a "LoggingOutputStream" when it really just is a FilterOutputStream?
Comment 4 Manuel Stahl CLA 2010-09-10 03:03:13 EDT
(In reply to comment #3)
> Nice :) 
> 
> See also bug 209875 for an earlier request for the same.
> 
> In the patch, your API addition seems to require a bit more thought though. Why
> do you define a "LoggingOutputStream" when it really just is a
> FilterOutputStream?

Because with a FilterOutputStream you can set it's OutputStream only in the constructor. The View that creates the Filter has no access to that OutputStream.

I'm open for any other implementation, it was just the most obvious for me.
Comment 5 Martin Oberhuber CLA 2015-05-22 12:45:09 EDT
This patch is quite old so might be a nightmare to apply now that we have Terminal 4.0 ... but the problem that it fixes is potentially still relevant. 

I've seen multiple requests for logging Terminal input to a file (and also replaying that file to Terminal output). 

Any thoughts on potentially reviving this ?
Comment 6 Uwe Stieber CLA 2015-05-23 03:48:57 EDT
Hi Martin,
the request is still valid and it would be really nice to have a kind of logging facility. I think this request is worth investing. The patch itself will have to be reworked very likely for TM Terminal 4.0 or there might be even a differnt approach to logging.
Comment 7 Jonah Graham CLA 2020-05-01 10:11:07 EDT
The Terminal component of the Eclipse Ecosystem has a new home. The Terminal is now part of the Eclipse CDT project[1].

This change means a new Git repo[2], P2 site[3] and Bugzilla component. The terminal will continue to be delivered as part of the quarterly Simultaneous Release of Eclipse as well.

The marketplace entry[4] had not been updated in a few years. It will once again install the latest release of the terminal on the latest release of the whole IDE (currently 2020-03).

If this bug is no longer relevant, please feel free to comment or close the bug. If you can confirm if this issues still occurs in the latest release please do let me know in a comment.

[1] https://wiki.eclipse.org/CDT/User/NewIn911
[2] https://git.eclipse.org/c/cdt/org.eclipse.cdt.git (in the terminal directory)
[3] current release is 9.11 - P2 site https://download.eclipse.org/tools/cdt/releases/9.11/
[4] https://marketplace.eclipse.org/content/tm-terminal

(This comment was added to all open terminal bugs along with changing the Product/component pair to CDT/terminal.)