/** * Logs performance event failures to the platform's performance log */ private void logFailure(PerformanceStats stats, String pluginId, long elapsed) { //may have failed to get the performance log service if (log == null) return; if (pluginId == null) pluginId = Platform.PI_RUNTIME; String msg = "Performance failure: " + stats.getEvent() + " blame: " + stats.getBlameString() + " context: " + stats.getContext() + " duration: " + elapsed; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ Status status = new Status(IStatus.WARNING, pluginId, 1, msg, new RuntimeException()); log.log(new FrameworkLogEntry(status, status.getPlugin(), status.getSeverity(), status.getCode(), status.getMessage(), 0, status.getException(), null)); }
static void log(FrameworkLogEntry entry) { ServiceTracker frameworkLogTracker = _frameworkLogTracker; FrameworkLog log = frameworkLogTracker == null ? null : (FrameworkLog) frameworkLogTracker.getService(); if (log != null) log.log(entry); }
static void log(FrameworkLogEntry entry) { ServiceTracker frameworkLogTracker = _frameworkLogTracker; FrameworkLog log = frameworkLogTracker == null ? null : (FrameworkLog) frameworkLogTracker.getService(); if (log != null) log.log(entry); }
static void log(FrameworkLogEntry entry) { ServiceTracker frameworkLogTracker = _frameworkLogTracker; FrameworkLog log = frameworkLogTracker == null ? null : (FrameworkLog) frameworkLogTracker.getService(); if (log != null) log.log(entry); }
private static void startBundle(Bundle bundle, int options) { try { bundle.start(options); } catch (BundleException e) { if ((bundle.getState() & Bundle.RESOLVED) != 0) { // only log errors if the bundle is resolved FrameworkLogEntry entry = new FrameworkLogEntry(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, 0, NLS.bind(Msg.ECLIPSE_STARTUP_FAILED_START, bundle.getLocation()), 0, e, null); log.log(entry); } } }
private static void startBundle(Bundle bundle, int options) { try { bundle.start(options); } catch (BundleException e) { if ((bundle.getState() & Bundle.RESOLVED) != 0) { // only log errors if the bundle is resolved FrameworkLogEntry entry = new FrameworkLogEntry(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, 0, NLS.bind(Msg.ECLIPSE_STARTUP_FAILED_START, bundle.getLocation()), 0, e, null); log.log(entry); } } }
private static void startBundle(Bundle bundle, int options) { try { bundle.start(options); } catch (BundleException e) { if ((bundle.getState() & Bundle.RESOLVED) != 0) { // only log errors if the bundle is resolved FrameworkLogEntry entry = new FrameworkLogEntry(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, 0, NLS.bind(Msg.ECLIPSE_STARTUP_FAILED_START, bundle.getLocation()), 0, e, null); log.log(entry); } } }
private static void startBundle(Bundle bundle, int options) { try { bundle.start(options); } catch (BundleException e) { if ((bundle.getState() & Bundle.RESOLVED) != 0) { // only log errors if the bundle is resolved FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_FAILED_START, bundle.getLocation()), 0, e, null); log.log(entry); } } }
private static void startBundle(Bundle bundle, int options) { try { bundle.start(options); } catch (BundleException e) { if ((bundle.getState() & Bundle.RESOLVED) != 0) { // only log errors if the bundle is resolved FrameworkLogEntry entry = new FrameworkLogEntry(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, 0, NLS.bind(Msg.ECLIPSE_STARTUP_FAILED_START, bundle.getLocation()), 0, e, null); log.log(entry); } } }
private static void startBundle(Bundle bundle, int options) { try { bundle.start(options); } catch (BundleException e) { if ((bundle.getState() & Bundle.RESOLVED) != 0) { // only log errors if the bundle is resolved FrameworkLogEntry entry = new FrameworkLogEntry(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, 0, NLS.bind(Msg.ECLIPSE_STARTUP_FAILED_START, bundle.getLocation()), 0, e, null); log.log(entry); } } }
private static void startBundle(Bundle bundle, int options) { try { bundle.start(options); } catch (BundleException e) { if ((bundle.getState() & Bundle.RESOLVED) != 0) { // only log errors if the bundle is resolved FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_FAILED_START, bundle.getLocation()), 0, e, null); log.log(entry); } } }
public static void log(String msg, int severity, Throwable t) { if (SignedBundleHook.ADAPTOR == null) { System.err.println(msg); t.printStackTrace(); return; } FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, severity, 0, msg, 0, t, null); SignedBundleHook.ADAPTOR.getFrameworkLog().log(entry); }
private void internalError(String elementName) { FrameworkLogEntry error; String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_CONVERTER_PARSE_UNKNOWNTOP_ELEMENT, elementName); error = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, (manifestInfo.pluginId == null ? message : "Plug-in : " + manifestInfo.pluginId + ", " + message), 0, null, null); //$NON-NLS-1$ //$NON-NLS-2$ adaptor.getFrameworkLog().log(error); }
private void internalError(String elementName) { FrameworkLogEntry error; String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_CONVERTER_PARSE_UNKNOWNTOP_ELEMENT, elementName); error = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, (manifestInfo.pluginId == null ? message : "Plug-in : " + manifestInfo.pluginId + ", " + message), 0, null, null); //$NON-NLS-1$ //$NON-NLS-2$ adaptor.getFrameworkLog().log(error); }
public void log(String entry, int severity, String message, Throwable throwable, FrameworkLogEntry[] children) { getFrameworkLog().log(new FrameworkLogEntry(entry, severity, 0, message, 0, throwable, children)); } }
public BaseData[] getInstalledBundles() { try { return readBundleDatas(); } catch (Throwable t) { // be safe here and throw out the results and start over // otherwise this would result in a failed launch FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, "Error loading bundle datas. Recalculating cache.", 0, t, null); //$NON-NLS-1$ adaptor.getFrameworkLog().log(logEntry); return null; } }
private void cleanOSGiCache() { File osgiConfig = LocationManager.getOSGiConfigurationDir(); if (!AdaptorUtil.rm(osgiConfig)) adaptor.getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, "The -clean (osgi.clean) option was not successful. Unable to clean the storage area: " + osgiConfig.getAbsolutePath(), 0, null, null)); //$NON-NLS-1$ }
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(); } }
public BaseData[] getInstalledBundles() { try { return readBundleDatas(); } catch (Throwable t) { // be safe here and throw out the results and start over // otherwise this would result in a failed launch FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, "Error loading bundle datas. Recalculating cache.", 0, t, null); //$NON-NLS-1$ adaptor.getFrameworkLog().log(logEntry); return null; } }
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(); } }