Hello all, I'm currently trying to implement a facade for a metrics library and one of the objectives is to make its usage agnostic of the runtime environment. At my place, we have some components that are mainly used in the context of an OSGi container but can also be used in plain Java applications. I want to have three implementations of the facade where one makes use of an OSGi service, the other is a plain java library and the third a no-op. In essence, I want the usage of this facade to be similar to SLF4J. While replicating the mechanism used in SLF4J I remembered someone in this mailing list saying that the way SLF4J binds to the implementations is a hack and not recommended. I agree with the hack part but to me, as a user, it works quite well. If anyone could suggest better approaches I would be very grateful.
PS: This is what I'm trying to achieve: .... > private final Counter aCounter = MetricsFactory.getCounter("aCounter"); > ... Thank you. João Assunção Email: joao.assun...@exploitsys.com Mobile: +351 916968984 Phone: +351 211933149 Web: www.exploitsys.com
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev