You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by hezjing <he...@gmail.com> on 2007/05/24 15:44:55 UTC

SessionLog

Hi!

May I know what are the differences between
org.apache.mina.util.SessionLog and the normal logger like
org.slf4j.Logger?

Are we encouraged to use SessionLog in MINA application?

It would be very nice to describe more in its Javadoc.


-- 

Hez

Re: SessionLog

Posted by Niklas Therning <ni...@trillian.se>.
hezjing wrote:
> Hi!
>
> May I know what are the differences between
> org.apache.mina.util.SessionLog and the normal logger like
> org.slf4j.Logger?
>
> Are we encouraged to use SessionLog in MINA application?
>
> It would be very nice to describe more in its Javadoc.
>
>
The SessionLog uses SLF4J to log the message you provide but it will
also add a prefix to all log messages. The prefix it uses is the value
of the value of the SessionLog.PREFIX session attribute. If you don't
set this attribute yourself SessionLog will set it for you like this:

prefix = "[" + session.getRemoteAddress() + "] ";

-- 
Niklas Therning
www.spamdrain.net