On Tue, Oct 11, 2011 at 1:26 PM, Raymond Auge <raymond.a...@liferay.com> wrote: > On Tue, Oct 11, 2011 at 11:48 AM, Philipp Kursawe > <phil.kurs...@gmail.com> wrote: >> On Tue, Oct 11, 2011 at 2:20 PM, Neil Bartlett <njbartl...@gmail.com> wrote: >>> >>> 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. > > I suspect these are two of the main reasons why people are deriving > their own logging service wrappers to begin with. > > Though I suspect that it's to remove the OSGi APIs from their code as > well. e.g. such as bridging other more ubiquitous logging APIs onto > the LogService via a separate bundle (not that this is the correct > approach, but in the vein of DS, this makes not polluting your own > code with OSGi apis a moot point).
My point is simply that the LogService makes writing code free of OSGi apis (as is commonly preached) difficult on top of the other concerns above. -- Raymond Augé _______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev