james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <nor...@apache.org>
Subject Re: Logging library in our projects
Date Sat, 31 Dec 2011 14:23:36 GMT
Hi Stefano,

I would even put the slf4j adapter into the api package. Then make it optional as you said.
This will also work with osgi.

Bye,
Norman


-- 
Norman Maurer


Am Samstag, 31. Dezember 2011 um 15:03 schrieb Stefano Bagnara:

> 2011/12/31 Eric Charles <eric@apache.org (mailto:eric@apache.org)>:
> > Hello Norman,
> > 
> > Yes, I can understand this.
> > 
> > So, how are we gonna create a POP3Protocol(ProtocolHandlerChain,
> > ProtocolConfiguration, Logger) from server which uses slf4j?
> > 
> > We need to give as third parameter a org.apache.james.protocols.api.Logger.
> > 
> > An adapter between org.slf4j.Logger and
> > org.apache.james.protocols.api.Logger could do the job, even if find this a
> > bit overhead.
> > 
> > When integrating server and protocols trunk a few days before, I thus though
> > to these 2 options:
> > 1.- the adapter.
> > 2.- the uniformisation between all projects.
> > 
> > but didn't know where to go..., this is the reason for this thread :)
> > Maybe you have a third option in mind such as having two completely
> > separated logging mechanism when running protocols in server?
> > 
> 
> 
> IMO we should go with #1 (using a private Logger interface and then
> use an adapter to slf4j).
> 
> I also think that an slf4j adapter could be provided direclty in the
> protocols project and used as an optional dependency (so you don't
> have to write the adapter in every project).
> The "right" approach would be to have a protocols module with the
> slf4j adapter, but IMO a module for a single class is too much, so
> maybe we can simply put the adapter in the netty module or in the api
> module and then declare the slf4j dependency as optional, so that
> users of the library will decide if they want to use the slf4j logger
> or instead provide their own implementation.
> 
> I'm not sure if this plays well with OSGi.
> 
> Stefano
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org (mailto:server-dev-unsubscribe@james.apache.org)
> For additional commands, e-mail: server-dev-help@james.apache.org (mailto:server-dev-help@james.apache.org)
> 
> 



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message