/** * 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)); }
for(Status status : logger.getLoggerContext().getStatusManager().getCopyOfStatusList()){ System.out.println(status.getOrigin() + " - " + status.getMessage()); }
/** * 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)); }
private void validateExtensions() { try { String[] required = RequirementHelper.getApplicationRequirements(fLaunchConfiguration); for (int i = 0; i < required.length; i++) { BundleDescription bundle = getState().getBundle(required[i], null); if (bundle == null) { String message = NLS.bind(PDEMessages.EclipsePluginValidationOperation_pluginMissing, required[i]); Status status = new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, CREATE_EXTENSION_ERROR_CODE, message, null); IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status); Object extensionError = null; if (statusHandler == null) extensionError = status.getMessage(); else extensionError = statusHandler.handleStatus(status, required[i]); fExtensionErrors.put(extensionError, EMPTY); } } } catch (CoreException e) { PDELaunchingPlugin.log(e); } }
/** * 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)); }
if (!CoreUtil.TEST_MODE) { MessageDialog.openError(WorkbenchUtil.getShell(), Messages.WorkbenchUtil_Open_Location_Title, status.getMessage()); if (!CoreUtil.TEST_MODE) { MessageDialog.openWarning(WorkbenchUtil.getShell(), Messages.WorkbenchUtil_Open_Location_Title, status.getMessage()); } else { CommonsWorkbenchPlugin.getDefault().getLog().log(status); if (!CoreUtil.TEST_MODE) { MessageDialog.openError(WorkbenchUtil.getShell(), Messages.WorkbenchUtil_Open_Location_Title, status.getMessage()); } else { CommonsWorkbenchPlugin.getDefault().getLog().log(status);