On Tue, Oct 11, 2011 at 2:20 PM, Neil Bartlett <njbartl...@gmail.com> wrote:
> With DS and bnd annotations, I find the boilerplate for binding to the > log service is quite minimal, i.e.: > > @Reference(type = '?') > protected void setLogService(LogService log) { > this.log = log; > } > > However, the annoying boilerplate comes when you simply try to invoke > the service: > > log.log(LogService.LOG_ERROR, "blah blah"); > i.e., why do I have to type the word "log" FIVE times to output *ONE* > log message?? > Thats clearly a design flaw. The log4j way is much cleaner: log.error("blah"); > Another issue is that there is no way for a client to check if > debug-level logging is enabled. Thats also something pax-logging provides just nicely.
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev