-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved logging infrastructure and plugged Log4J in the scala-ide.sd…
…t.core project. We used to have too many alternatives to create log items (Eclipse Log framework, our ad-hoc naive internal Logger and println statements originating from scalac). In short, we did not have an ideal logging infrastructure. Now, I plugged Log4J as the backend logger (I'll refer to it as the "default logger" in the rest of this commit message), which replaces our naive ad-hoc Logger. Further, all log events occurring in the Eclipse Log Framework are now *forwarded* to the default logger. Also, the Standard Output and Standard Error are *redirected* to the default logger. The goal is to have a single place to consult the log, and that is now the *scala-ide.log* file that is produced by the default logger, located in ${workspace}/.metadata/.plugin/org.scala-ide.sdt.core/ It's easy to consult the log from within Eclipse, just open the Eclipse Preferences, then Scala > Logging, and there is a link to open the *scala-ide.log* file in the editor (though, mind that it is not automatically refreshed while it's open). From the same preference's page, you can also control the amount of produced log, i.e., you can set the log level that better suits you (the default level is WARNING). If needed, you can also enable a console appender to print all produced log items in the console (this is quite handy when doing development on the Scala IDE sources). To get a handle on the loggers you simply need to mix-in the HasLogger trait, which contains a reference to both the default logger and the Eclipse Log. You may wonder why we have two loggers. The reason is simple, if you want to communicate a message to the user, you should use the Eclipse Log. This becayse messages sent to the Eclipse Log are shown in the Eclipse Log View (remember that all messages sent to the Eclipse Log are also forwarded to the default logger, so you don't need to log the same message twice). In all other cases, you should use th default logger. Finally, I removed the "plugininfo" option, which it was used to enable debug information in the ScalaIndexBuilder. As a matter of fact, the amount of logged information can now be easily controlled through Log Levels. One element I'm not happy with is that I plugged Log4J within the scala-ide.sdt.core project and not as an external plug-in. I've tried to do so but failed due to my lack of understanding of OSGi. This is something that I believe we should do at some point (maybe someone can help with this?!). Fixes #1000880.
- Loading branch information
Showing
56 changed files
with
698 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.