Bug 209665 - Need ability to log byte streams from Terminal for debugging
Summary: Need ability to log byte streams from Terminal for debugging
Status: VERIFIED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: Terminal (show other bugs)
Version: 2.0.1   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Michael Scharf CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 209965
  Show dependency tree
 
Reported: 2007-11-13 11:58 EST by Martin Oberhuber CLA
Modified: 2008-02-25 19:39 EST (History)
1 user (show)

See Also:


Attachments
A patch that adds a decorator stream coming from the baackend (1.08 KB, patch)
2007-11-14 01:13 EST, Michael Scharf CLA
no flags Details | Diff
mylyn/context/zip (2.77 KB, application/octet-stream)
2007-11-14 01:13 EST, Michael Scharf CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2007-11-13 11:58:01 EST
Currently, the Terminal Telnet connector is capable of logging its input byte stream for debugging purposes:

  * Create directory C:\eclipselogs (on Windows) or /tmp/eclipselogs (on UNIX)
  * File "tmterminal.log" will be created with byte stream logging

I think that all Terminal connectors should be capable of logging the byte streams, so this should be moved to the common Terminal widget. Use "Logger.encode() referenced-by" to see how the Telnet connector currently does it.

Also, the method for switching on logging should be improved to allow arbitraray target directories for the log files, since local policies could forbid users to write into the hard-coded directories.

I'd be in favor of using the Platform Debug (.options) method for this.
Comment 1 Michael Scharf CLA 2007-11-14 01:13:32 EST
Created attachment 82842 [details]
A patch that adds a decorator stream coming from the baackend

LoggingOutputStream is a FilterOutoutStream that does the logging
Comment 2 Michael Scharf CLA 2007-11-14 01:13:40 EST
Created attachment 82843 [details]
mylyn/context/zip
Comment 3 Michael Scharf CLA 2007-11-14 01:15:39 EST
checked in
Comment 4 Martin Oberhuber CLA 2008-02-25 19:39:40 EST
Verified with TM 2.0.3 candidate on Linux-GTK RHEL4:

When directory 
    /tmp/eclipselogs
exists, each "SSH", "Telnet", "Serial" terminal connectors log to file
    tmterminal.log
in that directory.