Package org.eclipse.osgi.framework.log

Examples of org.eclipse.osgi.framework.log.FrameworkLog.log()


            int level = getSeverity(logLevel);
            if (level >= 0) {
                String message = getMessage(logType, th.getMessage());
                FrameworkLogEntry entry = myActivator.createFrameworkLogEntry(FrameworkEvent.ERROR, message, th);
                if (entry != null) {
                    log.log(entry);
                }
            }
        }
    }
View Full Code Here


            int level = getSeverity(logLevel);
            if (level >= 0) {
                message = getMessage(logType, message);
                FrameworkLogEntry entry = myActivator.createFrameworkLogEntry(FrameworkEvent.ERROR, message, null);
                if (entry != null) {
                    log.log(entry);
                }
            }
        }
    }
View Full Code Here

  }
 
  public static void log(IStatus status) {
    FrameworkLog log = Activator.getFrameworkLog();
    if (log != null) {
      log.log(getLog(status));
    } else {
      System.out.println(status.getMessage());
      if (status.getException() != null)
        status.getException().printStackTrace();
    }
View Full Code Here

      public void log(IStatus status) {
        ServiceTracker frameworkLogTracker = _frameworkLogTracker;
        FrameworkLog log = frameworkLogTracker == null ? null : (FrameworkLog) frameworkLogTracker.getService();
        if (log != null) {
          log.log(createLogEntry(status));
        } else {
          // fall back to System.err
          System.err.println(status.getPlugin() + " - " + status.getCode() + " - " + status.getMessage())//$NON-NLS-1$//$NON-NLS-2$
          if( status.getException() != null ) {
            status.getException().printStackTrace(System.err);
View Full Code Here

      public void log(IStatus status) {
        ServiceTracker frameworkLogTracker = _frameworkLogTracker;
        FrameworkLog log = frameworkLogTracker == null ? null : (FrameworkLog) frameworkLogTracker.getService();
        if (log != null) {
          log.log(createLogEntry(status));
        } else {
          // fall back to System.err
          System.err.println(status.getPlugin() + " - " + status.getCode() + " - " + status.getMessage())//$NON-NLS-1$//$NON-NLS-2$
          if( status.getException() != null ) {
            status.getException().printStackTrace(System.err);
View Full Code Here

    if (logTracker == null) {
      logTracker = new ServiceTracker(getContext(), FrameworkLog.class.getName(), null);
      logTracker.open();
    }
    FrameworkLog log = (FrameworkLog) logTracker.getService();
    log.log(getEntry(status));
  }

  /*
   * Copied code from PlatformLogWriter to convert a status object into
   * a FrameworkLogEntry.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.