1 package winterwell.markdown;
3 import org.eclipse.core.runtime.ILog;
4 import org.eclipse.core.runtime.IStatus;
5 import org.eclipse.core.runtime.Status;
9 * @author Lamb Gao, Paul Verest
11 public class LogUtil {
13 public static void info(String message) {
14 log(IStatus.INFO, IStatus.OK, message, null);
17 public static void error(Throwable exception) {
18 error("Unexpected Exception", exception);
21 public static void error(String message) {
25 public static void error(String message, Throwable exception) {
26 log(IStatus.ERROR, IStatus.ERROR, message, exception);
29 public static void log(int severity, int code, String message, Throwable exception) {
30 log(createStatus(severity, code, message, exception));
33 public static IStatus createStatus(int severity, int code, String message, Throwable exception) {
34 return new Status(severity, Activator.PLUGIN_ID, code, message, exception);
37 public static void log(IStatus status) {
38 ILog log = Activator.getDefault().getLog();