Bug 180340 - [JUnit] JUnit launcher writes everything to log
Summary: [JUnit] JUnit launcher writes everything to log
Status: RESOLVED INVALID
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: polish
Depends on:
Blocks:
 
Reported: 2007-03-31 01:09 EDT by Wassim Melhem CLA
Modified: 2011-06-15 17:18 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wassim Melhem CLA 2007-03-31 01:09:13 EDT
3.3 M6

Whenever a JUnit launch is aborted, and consequently whenever a JUnit Plug-in launch is aborted, I see an error dialog (which is fine). 

However, an error message also gets logged to the .log file with each error.

Since these errors are user errors, not system errors.  It may be a bit harsh to log them. 

The error dialog is sufficient.

Another reason why they should not be logged is because these error messages are translated, as they are meant to be seen by the user.

Logged messages must remain in English.
Comment 1 Markus Keller CLA 2007-05-08 10:52:05 EDT
I guess by "aborted", you mean that clients call JUnitLaunchConfigurationDelegate.abort(String, Throwable, int).

AFAICS, that's actually a feature of the launching framework:

DebugUIPlugin.launchInBackground(...).new Job() {...}.run(IProgressMonitor) catches CoreExceptions thrown by LaunchConfigurationDelegates and tries to handle them in a (contributable) IStatusHandler. If no handler is found, then the CoreException's status is used as job result status, which is logged by Worker.run() it if it has severity ERROR or WARNING.

jdt.junit's JUnitLaunchConfigurationDelegate deals with this by not calling abort(..) but our private informAndAbort(..), which shows a dialog and then throws a CoreExceptions with an INFO status (which is not logged afterwards).

Another solution for PDE could be to contribute status handlers for the error codes you pass to abort(..). I will leave jdt.junit unchanged. You can either copy our solution or try the "offical" way with status handlers.

Moving back to PDE. Please move to Debug if you think the handling of CoreExceptions should be improved or better documented.
Comment 2 Curtis Windatt CLA 2011-06-15 17:18:35 EDT
The current behaviour is not a problem for developers.  Please reopen if this affects you in a more recent build.