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

Bug 338492

Summary: Please add method 'log(String, Throwable)' to CodanCorePlugin
Product: [Tools] CDT Reporter: Alex Ruiz <alruiz>
Component: cdt-codanAssignee: Sergey Prigogin <eclipse.sprigogin>
Status: RESOLVED FIXED QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: enhancement    
Priority: P3 CC: alruiz, cdtdoug, eclipse.sprigogin
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Proposed patch eclipse.sprigogin: iplog+

Description Alex Ruiz CLA 2011-02-28 19:15:42 EST
Build Identifier: 20110204-0611

It would be pretty handy if CodanCorePlugin had the static method "log(String, Throwable)" (like other plugins do.)

This method basically does this:
log(new Status(IStatus.ERROR, CodanCorePlugin.PLUGIN_ID, 1, message, e));

I'm attaching a patch that also cleans up 'log(Throwable)' by delegating to this new method.

Reproducible: Always

Steps to Reproduce:
N/A (API request)
Comment 1 Alex Ruiz CLA 2011-02-28 19:16:34 EST
Created attachment 190011 [details]
Proposed patch

Proposed solution.
Comment 2 Sergey Prigogin CLA 2011-03-04 18:08:45 EST
Fixed in HEAD > 20110204.
Comment 3 CDT Genie CLA 2011-03-04 18:23:08 EST
*** cdt cvs genie on behalf of sprigogin ***
Bug 338492 - 'log(String, Throwable)' method. Patch by Alex Ruiz.

[*] CodanCorePlugin.java 1.7 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanCorePlugin.java?root=Tools_Project&r1=1.6&r2=1.7