mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Added logging methods with severity as parameter
This commit is contained in:
parent
df7db35d55
commit
b5d0a617f2
1 changed files with 28 additions and 0 deletions
|
@ -1331,6 +1331,34 @@ public class CCorePlugin extends Plugin {
|
|||
log(createStatus(e));
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a message in the log
|
||||
*
|
||||
* @param severity - desired severity of the message in the log,
|
||||
* one of {@link IStatus#INFO}, {@link IStatus#WARNING} or {@link IStatus#ERROR}
|
||||
* @param msg - message
|
||||
*
|
||||
* @since 5.5
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
public static void log(int severity, String msg) {
|
||||
log(new Status(severity, PLUGIN_ID, msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a message in the log accompanied by stack trace
|
||||
*
|
||||
* @param severity - desired severity of the message in the log,
|
||||
* one of {@link IStatus#INFO}, {@link IStatus#WARNING} or {@link IStatus#ERROR}
|
||||
* @param msg - message
|
||||
*
|
||||
* @since 5.5
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
public static void logStackTrace(int severity, String msg) {
|
||||
log(new Status(severity, PLUGIN_ID, msg, new Exception()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue