using InternalLogger in Netty's wrapper

"이희승 (Trustin Lee)" trustin at gmail.com
Tue Jun 23 04:42:09 EDT 2009


Hi Piotr,

If you are going to provide a logging layer similar to what Netty
provides, you could write your own InternalLoggerFactory implementation
that redirects all logs to your logging layer.  It should be trivial to
implement, and the users will not need to touch InternalLoggerFactory at
all.

HTH,
Trustin

On 2009-06-23 오전 6:57, Piotr Findeisen wrote:
> Hello!
> 
> I'm writing a not-so-thin wrapper around Netty that provides
> mutlti-point communication using custom protocol.
> I would like to achieve code at least a little as configurable as
> Netty's code is. For example, I'd like to use logging framework of my
> users's choice. From skimming Netty's code it should be enough to put
> private static final InternalLogger logger =
> InternalLoggerFactory.getInstance(MyClass.class);
> in my classes.
> 
> Thus the I would achieve the goal with no effort, while my users would
> have to configure use of their framework of choice only once (once for
> Netty -- and for my code too). Cool -- but the InternalLogger is
> commented "*DO NOT* access this class outside of Netty."
> Why is that? How can I achieve configurable logging framework,
> preferably not duplicating the code?
> 
> thanks for help!
> Piotr
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users


-- 
— Trustin Lee, http://gleamynode.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20090623/db61ea3f/attachment.bin 


More information about the netty-users mailing list