Community
Participate
Working Groups
To access the Platform log we currently support: Bundle BUNDLE = FrameworkUtil.getBundle(SampleHandler.class); ILog LOGGER = Platform.getLog(BUNDLE); Lets make this easier by Platform.getLog(.class).
Christoph/ Jonas, please let me know what you think.
New Gerrit change created: https://git.eclipse.org/r/148160
Yes, this is awesome. Loggers are most convenient when accessed with a one-liner at the top of a file. Every extra line adds more code. I like it.
@Lars may be we can go one step further and provide Platform.log(IStatus status, Class<?> clazz) ? This will allow us to reduce the client code even more and also hide all the implementation details
New Gerrit change created: https://git.eclipse.org/r/148216
(In reply to Alexander Fedorov from comment #4) > @Lars may be we can go one step further and provide > > Platform.log(IStatus status, Class<?> clazz) > ? > This will allow us to reduce the client code even more and also hide all the > implementation details Great idea. What about switching the arguments? Looks better to me. Platform.log(Class<?> clazz, IStatus status)
Gerrit change https://git.eclipse.org/r/148216 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=770f713b81b702b2c569249bffd2704ab4f1fff1
(In reply to Lars Vogel from comment #6) > (In reply to Alexander Fedorov from comment #4) > > @Lars may be we can go one step further and provide > > > > Platform.log(IStatus status, Class<?> clazz) > > ? > > This will allow us to reduce the client code even more and also hide all the > > implementation details > > Great idea. What about switching the arguments? Looks better to me. > > Platform.log(Class<?> clazz, IStatus status) I used to think that "clazz" argument may be optional but I'm OK with your order as well.
(In reply to Alexander Fedorov from comment #8) > (In reply to Lars Vogel from comment #6) > I used to think that "clazz" argument may be optional but I'm OK with your > order as well. Thanks, please review the Gerrit.
+1 by project lead
Gerrit change https://git.eclipse.org/r/148160 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=5e3a6bd27f10e4952f333179cace7ec96e9fc0d5
New Gerrit change created: https://git.eclipse.org/r/148224
Gerrit change https://git.eclipse.org/r/148224 was merged to [master]. Commit: http://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=e1ac3e42177c54364f26d098e2aec1e8e8766aac
New Gerrit change created: https://git.eclipse.org/r/148227
Gerrit change https://git.eclipse.org/r/148227 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=0b9fe0fa4546e8716fb9db9686ec95456c0c835d
(In reply to Alexander Fedorov from comment #8) > I used to think that "clazz" argument may be optional but I'm OK with your > order as well. As this method was controversial I removed it again. Lets find a better solution for 4.14.
New Gerrit change created: https://git.eclipse.org/r/148228
Gerrit change https://git.eclipse.org/r/148228 was merged to [master]. Commit: http://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=6422a008ffec02050e7c8213457bb68843e26dc5
(In reply to Lars Vogel from comment #16) > (In reply to Alexander Fedorov from comment #8) > > I used to think that "clazz" argument may be optional but I'm OK with your > > order as well. > > As this method was controversial I removed it again. Lets find a better > solution for 4.14. Note that your change to pom.xml was wrong: <version>3.160.0-SNAPSHOT</version> I've fixed that.
(In reply to Dani Megert from comment #19) > Note that your change to pom.xml was wrong: You should install Releng Tools (https://download.eclipse.org/eclipse/downloads/drops4/S-4.13M3-201908211800/#org.eclipse.releng) which would warn you about mismatch between manifest and pom version.
(In reply to Dani Megert from comment #19) > (In reply to Lars Vogel from comment #16) > > (In reply to Alexander Fedorov from comment #8) > > > I used to think that "clazz" argument may be optional but I'm OK with your > > > order as well. > > > > As this method was controversial I removed it again. Lets find a better > > solution for 4.14. > Note that your change to pom.xml was wrong: > <version>3.160.0-SNAPSHOT</version> > I've fixed that. Thanks, Dani.
As noted in the other issue I'm not a huge fan of using/promoting/... useage of Platform-API.