문제

I have a eclipse plugin which implements BundleActivator,IStartup. I need to log the error that occur in earlyStartup(), I need the .log file to be updated for every error. I am unable to find any logging facility for earlyStartup eclipse plugin.

If anyone has any ideas about the same,please suggest.

도움이 되었습니까?

해결책

You can write to the .log file in the workspace .metadata directory using:

Bundle bundle = Platform.getBundle("plugin id");

IStatus status = new Status(IStatus.ERROR, "plugin id", msg or null, throwable or null);

Platform.getLog(bundle).log(status);

The first parameter to Status can be IStatus.INFO, WARNING or ERROR.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top