case org.osgi.service.log.LogService.LOG_INFO :
case 3 :
	public void _log(CommandInterpreter intp) throws Exception {		long logid = -1;		String token = intp.nextArgument();		if (token != null) {			Bundle bundle = getBundleFromToken(intp, token, false);			if (bundle == null) {				try {					logid = Long.parseLong(token);				} catch (NumberFormatException e) {					return;				}			} else {				logid = bundle.getBundleId();			}		}		org.osgi.framework.ServiceReference logreaderRef = context.getServiceReference("org.osgi.service.log.LogReaderService");		if (logreaderRef != null) {			Object logreader = context.getService(logreaderRef);			if (logreader != null) {				try {					Enumeration logentries = (Enumeration) (logreader.getClass().getMethod("getLog", null).invoke(logreader, null));					if (logentries.hasMoreElements()) {						Object logentry = logentries.nextElement();						Class clazz = logentry.getClass();						Method getBundle = clazz.getMethod("getBundle", null);						Method getLevel = clazz.getMethod("getLevel", null);						Method getMessage = clazz.getMethod("getMessage", null);						Method getServiceReference = clazz.getMethod("getServiceReference", null);						Method getException = clazz.getMethod("getException", null);						while (true) {							Bundle bundle = (Bundle) getBundle.invoke(logentry, null);							if ((logid == -1) || ((bundle != null) && (logid == bundle.getBundleId()))) {								Integer level = (Integer) getLevel.invoke(logentry, null);								switch (level.intValue()) {									case org.osgi.service.log.LogService.LOG_DEBUG :										intp.print(">");										intp.print(ConsoleMsg.formatter.getString("CONSOLE_DEBUG_MESSAGE"));										intp.print(" ");										break;									case org.osgi.service.log.LogService.LOG_INFO :										intp.print(">");										intp.print(ConsoleMsg.formatter.getString("CONSOLE_INFO_MESSAGE"));										intp.print(" ");										break;									case org.osgi.service.log.LogService.LOG_WARNING :										intp.print(">");										intp.print(ConsoleMsg.formatter.getString("CONSOLE_WARNING_MESSAGE"));										intp.print(" ");										break;									case org.osgi.service.log.LogService.LOG_ERROR :										intp.print(">");										intp.print(ConsoleMsg.formatter.getString("CONSOLE_ERROR_MESSAGE"));										intp.print(" ");										break;									default :										intp.print(">");										intp.print(level);										intp.print(" ");										break;								}								if (bundle != null) {									intp.print("[");									intp.print(new Long(bundle.getBundleId()));									intp.print("] ");								}								intp.print(getMessage.invoke(logentry, null));								intp.print(" ");								ServiceReference svcref = (ServiceReference) getServiceReference.invoke(logentry, null);								if (svcref != null) {									intp.print("{");									intp.print(Constants.SERVICE_ID);									intp.print("=");									intp.print(svcref.getProperty(Constants.SERVICE_ID).toString());									intp.println("}");								} else {									if (bundle != null) {										intp.println(bundle.getLocation());									} else {										intp.println();									}								}								Throwable t = (Throwable) getException.invoke(logentry, null);								if (t != null) {									intp.printStackTrace(t);								}							}							if (logentries.hasMoreElements()) {								logentry = logentries.nextElement();							} else {								break;							}						}					}				} finally {					context.ungetService(logreaderRef);				}				return;			}		}		intp.println(ConsoleMsg.formatter.getString("CONSOLE_LOGSERVICE_NOT_REGISTERED_MESSAGE"));	}