private void addDebuggingListeners() {
		if (!STDERR_DEBUGGING) {
			return;
		}

		frameworkBundleContext.addFrameworkListener(
			event -> {
				String msg = String.format("AA: %s %s\n", event.getBundle(), event);
				Msg.debug(this, msg);
			});

		frameworkBundleContext.addServiceListener(event -> {

			String type = "?";
			if (event.getType() == ServiceEvent.REGISTERED) {
				type = "registered";
			}
			else if (event.getType() == ServiceEvent.UNREGISTERING) {
				type = "unregistering";
			}

			String msg = String.format("BB: %s %s from %s\n", event.getSource(), type,
				event.getServiceReference().getBundle().getLocation());
			Msg.debug(this, msg);
		});
	}
A directory for use by the OSGi framework as a cache.

@return the directory
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java