public static void log(IStatus status) { if (context != null) { Platform.getLog(JavaLanguageServerPlugin.context.getBundle()).log(status); } }
/** * Method for log warning. * @param bundle required for the bundle ID. * @param warningMessage the message to log. */ public static void logWarning(final Bundle bundle, final String warningMessage) { Platform.getLog(bundle).log(new Status(IStatus.WARNING, bundle.getSymbolicName(), warningMessage)); }
public static void log(IStatus status) { final Bundle bundle = Platform.getBundle(ResourcesPlugin.PI_RESOURCES); if (bundle == null) return; Platform.getLog(bundle).log(status); }
public static void log(IStatus status) { final Bundle bundle = Platform.getBundle(ResourcesPlugin.PI_RESOURCES); if (bundle == null) return; Platform.getLog(bundle).log(status); }
public static void log(IStatus status) { final Bundle bundle = Platform.getBundle(ResourcesPlugin.PI_RESOURCES); if (bundle == null) return; Platform.getLog(bundle).log(status); }
/** * Log status. * * @param status the status to log * @since 3.4 */ private void logException(IStatus status) { Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID); ILog log= Platform.getLog(bundle); log.log(status); }
/** * Handles a core exception which occurs when accessing marker attributes. * * @param e the core exception */ private static void handleCoreException(CoreException e) { Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID); ILog log= Platform.getLog(bundle); log.log(e.getStatus()); }
/** * Defines the standard procedure to handle <code>CoreExceptions</code>. Exceptions * are written to the plug-in log. * * @param exception the exception to be logged * @param message the message to be logged */ protected void handleCoreException(CoreException exception, String message) { Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID); ILog log= Platform.getLog(bundle); IStatus status= message != null ? new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.OK, message, exception) : exception.getStatus(); log.log(status); }
public static ILog getLog() { return Platform.getLog(MarketplaceClientCorePlugin.getBundle()); }
/** * Defines the standard procedure to handle <code>CoreExceptions</code>. Exceptions * are written to the plug-in log. * * @param exception the exception to be logged * @param message the message to be logged */ protected void handleCoreException(CoreException exception, String message) { Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID); ILog log= Platform.getLog(bundle); IStatus status= message != null ? new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.OK, message, exception) : exception.getStatus(); log.log(status); }
/** * Convenience method for handling generic exceptions. * * @param exception * @param errorMessage */ public static void handleException(final Bundle bundle, final Exception exception, final String errorMessage) { final MultiStatus errorStatus = getServiceInfo(bundle, exception); final IStatus status = new Status(IStatus.ERROR, bundle.getSymbolicName(), IStatus.ERROR, errorMessage, exception); errorStatus.add(status); Platform.getLog(bundle).log(status); }
@Override public void handleException(Throwable exception) { String message= JFaceTextMessages.getString(fMessageKey); IStatus status= new Status(IStatus.ERROR, PLUGIN_ID, message, exception); Platform.getLog(Platform.getBundle(PLUGIN_ID)).log(status); fLastErrorMessage= message; } }
@Override public void earlyStartup() { final Bundle bundle = Platform.getBundle(ID); logger = Platform.getLog(bundle); detect(new Properties(), Collections.<String>emptyList()); }
@Override public void handleException(Throwable exception) { String message= JFaceTextMessages.getString(fMessageKey); IStatus status= new Status(IStatus.ERROR, PLUGIN_ID, message, exception); Platform.getLog(Platform.getBundle(PLUGIN_ID)).log(status); fLastErrorMessage= message; } }
@Override public void earlyStartup() { final Bundle bundle = Platform.getBundle(ID); logger = Platform.getLog(bundle); detect(new Properties(), Collections.<String>emptyList()); }
/** * Prints message to log if category matches /debug/tracefilter option. * @param message text to print * @param category category of the message, to be compared with /debug/tracefilter */ protected static void _trace(String category, String message, Throwable exception) { if (isTracing(category)) { message = (message != null) ? message : "null"; //$NON-NLS-1$ Status statusObj = new Status(IStatus.OK, PLUGIN_ID, IStatus.OK, message, exception); Bundle bundle = Platform.getBundle(PLUGIN_ID); if (bundle != null) Platform.getLog(bundle).log(statusObj); } }
private void log(Exception e, AspectManifest manifest) { Platform.getLog(Platform.getBundle(manifest.pluginId())) .log(new Status(IStatus.ERROR, manifest.pluginId(), 0, e.getMessage(), e)); } }
private void updateMap(ISymbol symbol, String scopeName) { final Map<Object, ISymbol> map = getMapForScopeInternal(scopeName); if (map != null) { map.put(symbol.getName(), symbol); } else { Platform.getLog(JSFCorePlugin.getDefault().getBundle()).log(new Status(IStatus.ERROR, JSFCorePlugin.PLUGIN_ID, 0, "Scope not found: "+scopeName, new Throwable())); //$NON-NLS-1$ } }
public void logged(OMLogger logger, Level level, String msg, Throwable t) { try { OSGiBundle bundle = (OSGiBundle)logger.getBundle(); ILog log = Platform.getLog(bundle.getBundleContext().getBundle()); log.log(new Status(toEclipse(level), bundle.getBundleID(), IStatus.OK, msg, t)); } catch (RuntimeException ignore) { } }
/** * Convenience method for handling generic exceptions. * * @param exception * @param errorMessage */ public static void handleErrorStatus(final Bundle bundle, final IStatus status) { final MultiStatus multiStatus = getServiceInfo(bundle, status.getException()); multiStatus.add(status); Platform.getLog(bundle).log(status); }