Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.ILog


  protected BasePluginService(AbstractUIPlugin plugin) {
    this.plugin = plugin;
  }

  public void log(Throwable t) {
    ILog log = Platform.getLog(plugin.getBundle());
    Status status = new Status(Status.ERROR, plugin.getBundle()
        .getSymbolicName(), Status.ERROR, t.getLocalizedMessage(), t); //$NON-NLS-1$
    log.log(status);
  }
View Full Code Here


        message = e.toString();
      } else {
        message = e.getMessage();
      }
    }
    ILog log = Platform.getLog(plugin.getBundle());
    Status status = new Status(Status.ERROR, plugin.getBundle()
        .getSymbolicName(), Status.ERROR, message, e);
    log.log(status);
    if (plugin.getWorkbench() != null
        && plugin.getWorkbench().getActiveWorkbenchWindow() != null
        && plugin.getWorkbench().getActiveWorkbenchWindow().getShell() != null) {
      Shell shell = plugin.getWorkbench().getActiveWorkbenchWindow()
          .getShell();
View Full Code Here

import org.eclipse.core.runtime.Status;


public class Logger {
  static public void log(String msg, int msgType) {
    ILog log = DerbyPlugin.getDefault().getLog();
    Status status = new Status(msgType, DerbyPlugin.getDefault().getBundle().getSymbolicName(), msgType, msg + "\n", null);
    log.log(status);
   
  }
View Full Code Here

  public static Image getJettyIcon() {
    return plugin.getImageRegistry().get(JETTY_ICON);
  }

  static public void logError(Exception e) {
    ILog log = plugin.getLog();
    StringWriter stringWriter = new StringWriter();
    e.printStackTrace(new PrintWriter(stringWriter));
    String msg = stringWriter.getBuffer().toString();
    Status status = new Status(IStatus.ERROR, getDefault().getBundle()
        .getSymbolicName(), IStatus.ERROR, msg, null);
    log.log(status);
  }
View Full Code Here

        .getSymbolicName(), IStatus.ERROR, msg, null);
    log.log(status);
  }

  static public void logError(String msg) {
    ILog log = plugin.getLog();
    Status status = new Status(IStatus.ERROR, getDefault().getBundle()
        .getSymbolicName(), IStatus.ERROR, msg + "\n", null);
    log.log(status);
  }
View Full Code Here

  public static Image getJettyIcon() {
    return plugin.getImageRegistry().get(JETTY_ICON);
  }

  static public void logError(Exception e) {
    ILog log = plugin.getLog();
    StringWriter stringWriter = new StringWriter();
    e.printStackTrace(new PrintWriter(stringWriter));
    String msg = stringWriter.getBuffer().toString();
    Status status = new Status(IStatus.ERROR, getDefault().getBundle()
        .getSymbolicName(), IStatus.ERROR, msg, null);
    log.log(status);
  }
View Full Code Here

        .getSymbolicName(), IStatus.ERROR, msg, null);
    log.log(status);
  }

  static public void logError(String msg) {
    ILog log = plugin.getLog();
    Status status = new Status(IStatus.ERROR, getDefault().getBundle()
        .getSymbolicName(), IStatus.ERROR, msg + "\n", null);
    log.log(status);
  }
View Full Code Here

   * Logging debug information.
   *
   * @param message message
   */
  public static void logDebug(String message){
    ILog log = getDefault().getLog();
    IStatus status = new Status(IStatus.INFO,getDefault().getPluginId(),0,message,null);
    log.log(status);
  }
View Full Code Here

   * Logging error information.
   *
   * @param message message
   */
  public static void logError(String message){
    ILog log = getDefault().getLog();
    IStatus status = new Status(IStatus.ERROR,getDefault().getPluginId(),0,message,null);
    log.log(status);
  }
View Full Code Here

   * Logging exception information.
   *
   * @param ex exception
   */
  public static void logException(Throwable ex){
    ILog log = getDefault().getLog();
    IStatus status = null;
    if(ex instanceof CoreException){
      status = ((CoreException)ex).getStatus();
    } else {
      status = new Status(IStatus.ERROR,getDefault().getPluginId(),0,ex.toString(),ex);
    }
    log.log(status);
   
    // TODO debug
    ex.printStackTrace();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.ILog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.