-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logger in BEF is not working after initial Bazel builds start #10
Comments
I am also seeing this error on startup from the Gradle plugin only when the BEF is installed: An internal error occurred during: "Loading available Gradle versions". |
I suspect these issues happen when M2Eclipse is also installed. I see this at startup in my Eclipse that is affected when BEF is not installed: org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized. Will retry after the state location is initialized. I have ripped out all external logging libs from BEF for the short term until we have time to investigate. |
This was resolved by doing what we can to log to the Eclipse platform logger, but we now have a /tmp/bef.log (on Unix) which is a log file fully under our control. We send all log lines there in addition to the platform logger. |
This started as a logback issue, but now it is something different. I think what is happening is once we start invoking Bazel commands, and hook stdout and stderr for that, our logging to outer Eclipse no longer works.
====
We revamped the logging for the feature. But on my machine, file logging is not working correctly. I tried a bunch of different things, but in the end I found a clue that suggests a load ordering problem.
I have added this check to our Eclipse logging facade:
bazel-eclipse/plugin-core/src/main/java/com/salesforce/bazel/eclipse/EclipseLoggerFacade.java#L153
And it indicates the logback is indeed in the classpath, but for some reason my log factory was initialized too early or in a different plugin such that logback was not found:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
com.salesforce.bazel.eclipse.core: EclipseLoggerFacade could not configure file (INFO, DEBUG) logging. LoggerFactory is of type [class org.slf4j.helpers.NOPLoggerFactory] but needed [ch.qos.logback.classic.LoggerContext] to configure the file log. The class ch.qos.logback.classic.LoggerContext is NOW available in the classpath, which means there was a startup loading issue. The class wasn't there when logging was initialized. See bazel-eclipse/docs/dev/logging.md for more details.
The text was updated successfully, but these errors were encountered: