You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Chandrajeet Padhy <ch...@gmail.com> on 2008/10/20 16:55:56 UTC
IoHandler and LoggingFilter question
Hi All,
I am having a trouble with the IoHandlerAdapter. I can see messages
transmitting and only messageSent gets invoked. Even if there is a message
reply it doesn't come into messageReceived method.
Thus I reused the logging filter to handle message receipts as a work
around. as below
serviceConfig.getFilterChain().addLast("logger", new
RFMessageFilter(eventHandlingStrategy));
But, I want to switch off the log messages those gets printed at "INFO"
level from org.apache.mina.util.SessionLog.
How can I turn off the log messages or change the log level to not to print
at all.
Thanks,
Chandra
Re: IoHandler and LoggingFilter question
Posted by Emmanuel Lecharny <el...@gmail.com>.
Chandrajeet Padhy wrote:
> Hi Emanuael,
>
> Thanks for replying.
>
> I am using log4-jboss configurations and my root looks like.
> <root>
> <priority value="INFO"/>
> <appender-ref ref="CONSOLE"/>
> <appender-ref ref="FILE"/>
> </root>
>
> I don't want any log message from apache SessionLog. I went added a new
> appender
> <category name="org.apache.mina.util.SessionLog">
> <priority value="NONE"/>
> <appender-ref ref="FILE"/>
> </category>
>
I think that the category's name is more or less something like
"org.apache.mina.util.SessionLog.logger" or "SessionLog.logger".
>
> 2) Another question related to IoConnector. How do I terminate a connection.
> Isn't it default when all the connect requests are freezed it should
> automatically stop? But, I still see it up sometimes.
>
You have initiated the connection, you have to close it.
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org
Re: IoHandler and LoggingFilter question
Posted by Chandrajeet Padhy <ch...@gmail.com>.
Hi Maarteen,
Thanks for writng. As u see, I started this thread with a Subject "IoHandler
.."
"I am having a trouble with the IoHandlerAdapter. I can see messages
transmitting and only messageSent gets invoked. But even if there is a
message reply it doesn't come into the messageReceived method of the
IoHandler.
Thus I reused the logging filter to handle message receipts as a work
around.
"
On Tue, Oct 21, 2008 at 2:22 AM, Maarten Bosteels
<mb...@gmail.com>wrote:
> On Mon, Oct 20, 2008 at 6:52 PM, Chandrajeet Padhy <chandrajeet@gmail.com
> >wrote:
>
> > Hi Emanuael,
> >
> > Thanks for replying.
> >
> > I am using log4-jboss configurations and my root looks like.
> > <root>
> > <priority value="INFO"/>
> > <appender-ref ref="CONSOLE"/>
> > <appender-ref ref="FILE"/>
> > </root>
> >
> > I don't want any log message from apache SessionLog. I went added a new
> > appender
> > <category name="org.apache.mina.util.SessionLog">
> > <priority value="NONE"/>
> > <appender-ref ref="FILE"/>
> > </category>
> >
> > But I still see those log messages.
> >
>
> Hi,
>
> If you don't want to see log messages from SessionLog
> then why are youy adding the LoggingFilter to the chain ?
>
> Maarten
>
> >
> >
> > 2) Another question related to IoConnector. How do I terminate a
> > connection.
> > Isn't it default when all the connect requests are freezed it should
> > automatically stop? But, I still see it up sometimes.
> >
> > Thanks,
> >
> >
> >
> > On Mon, Oct 20, 2008 at 11:35 AM, Emmanuel Lecharny <elecharny@gmail.com
> > >wrote:
> >
> > > Chandrajeet Padhy wrote:
> > >
> > >> Thanks Emanuael for writing,
> > >>
> > >> But the SessionLog class is part of the core1-1-6.jar. I dont use
> SLF4J.
> > >> We use log4j.
> > >>
> > >>
> > > and mina is using slf4j. This is just a facade : it mimics the user's
> > > logger. So whatever configuration you set for log4j, it will be used by
> > > slf4j.
> > >
> > >> SessionLog puts the messages on [STDERR] console appender. I just want
> > to
> > >> suppress all SessionLog messages. Is there a machanism?
> > >>
> > >>
> > > Just modify your log4j configuration so that no log is produced. It
> > should
> > > work.
> > >
> > >
> > > --
> > > --
> > > cordialement, regards,
> > > Emmanuel Lécharny
> > > www.iktek.com
> > > directory.apache.org
> > >
> > >
> > >
> >
>
Re: IoHandler and LoggingFilter question
Posted by Maarten Bosteels <mb...@gmail.com>.
On Mon, Oct 20, 2008 at 6:52 PM, Chandrajeet Padhy <ch...@gmail.com>wrote:
> Hi Emanuael,
>
> Thanks for replying.
>
> I am using log4-jboss configurations and my root looks like.
> <root>
> <priority value="INFO"/>
> <appender-ref ref="CONSOLE"/>
> <appender-ref ref="FILE"/>
> </root>
>
> I don't want any log message from apache SessionLog. I went added a new
> appender
> <category name="org.apache.mina.util.SessionLog">
> <priority value="NONE"/>
> <appender-ref ref="FILE"/>
> </category>
>
> But I still see those log messages.
>
Hi,
If you don't want to see log messages from SessionLog
then why are youy adding the LoggingFilter to the chain ?
Maarten
>
>
> 2) Another question related to IoConnector. How do I terminate a
> connection.
> Isn't it default when all the connect requests are freezed it should
> automatically stop? But, I still see it up sometimes.
>
> Thanks,
>
>
>
> On Mon, Oct 20, 2008 at 11:35 AM, Emmanuel Lecharny <elecharny@gmail.com
> >wrote:
>
> > Chandrajeet Padhy wrote:
> >
> >> Thanks Emanuael for writing,
> >>
> >> But the SessionLog class is part of the core1-1-6.jar. I dont use SLF4J.
> >> We use log4j.
> >>
> >>
> > and mina is using slf4j. This is just a facade : it mimics the user's
> > logger. So whatever configuration you set for log4j, it will be used by
> > slf4j.
> >
> >> SessionLog puts the messages on [STDERR] console appender. I just want
> to
> >> suppress all SessionLog messages. Is there a machanism?
> >>
> >>
> > Just modify your log4j configuration so that no log is produced. It
> should
> > work.
> >
> >
> > --
> > --
> > cordialement, regards,
> > Emmanuel Lécharny
> > www.iktek.com
> > directory.apache.org
> >
> >
> >
>
Re: IoHandler and LoggingFilter question
Posted by Chandrajeet Padhy <ch...@gmail.com>.
Hi Emanuael,
Thanks for replying.
I am using log4-jboss configurations and my root looks like.
<root>
<priority value="INFO"/>
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
</root>
I don't want any log message from apache SessionLog. I went added a new
appender
<category name="org.apache.mina.util.SessionLog">
<priority value="NONE"/>
<appender-ref ref="FILE"/>
</category>
But I still see those log messages.
2) Another question related to IoConnector. How do I terminate a connection.
Isn't it default when all the connect requests are freezed it should
automatically stop? But, I still see it up sometimes.
Thanks,
On Mon, Oct 20, 2008 at 11:35 AM, Emmanuel Lecharny <el...@gmail.com>wrote:
> Chandrajeet Padhy wrote:
>
>> Thanks Emanuael for writing,
>>
>> But the SessionLog class is part of the core1-1-6.jar. I dont use SLF4J.
>> We use log4j.
>>
>>
> and mina is using slf4j. This is just a facade : it mimics the user's
> logger. So whatever configuration you set for log4j, it will be used by
> slf4j.
>
>> SessionLog puts the messages on [STDERR] console appender. I just want to
>> suppress all SessionLog messages. Is there a machanism?
>>
>>
> Just modify your log4j configuration so that no log is produced. It should
> work.
>
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>
Re: IoHandler and LoggingFilter question
Posted by Emmanuel Lecharny <el...@gmail.com>.
Chandrajeet Padhy wrote:
> Thanks Emanuael for writing,
>
> But the SessionLog class is part of the core1-1-6.jar. I dont use SLF4J.
> We use log4j.
>
and mina is using slf4j. This is just a facade : it mimics the user's
logger. So whatever configuration you set for log4j, it will be used by
slf4j.
> SessionLog puts the messages on [STDERR] console appender. I just want to
> suppress all SessionLog messages. Is there a machanism?
>
Just modify your log4j configuration so that no log is produced. It
should work.
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org
Re: IoHandler and LoggingFilter question
Posted by Chandrajeet Padhy <ch...@gmail.com>.
Thanks Emanuael for writing,
But the SessionLog class is part of the core1-1-6.jar. I dont use SLF4J.
We use log4j.
SessionLog puts the messages on [STDERR] console appender. I just want to
suppress all SessionLog messages. Is there a machanism?
Much appreciated of your time,
Chandra
On Mon, Oct 20, 2008 at 10:06 AM, Emmanuel Lecharny <el...@gmail.com>wrote:
> Chandrajeet Padhy wrote:
>
>> Hi All,
>>
>> I am having a trouble with the IoHandlerAdapter. I can see messages
>> transmitting and only messageSent gets invoked. Even if there is a message
>> reply it doesn't come into messageReceived method.
>> Thus I reused the logging filter to handle message receipts as a work
>> around. as below
>> serviceConfig.getFilterChain().addLast("logger", new
>> RFMessageFilter(eventHandlingStrategy));
>>
>> But, I want to switch off the log messages those gets printed at "INFO"
>> level from org.apache.mina.util.SessionLog.
>> How can I turn off the log messages or change the log level to not to
>> print
>> at all.
>>
>>
> Mina's logger relies on slf4j which is a facade. Your application's logger
> has to be configured in order to change the logs you'll get. So if you are
> using Log4j, just modify your log4j configuration.
>
> Here is a page which explains how to do that :
> http://mina.apache.org/logging-configuration.html
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>
Re: IoHandler and LoggingFilter question
Posted by Emmanuel Lecharny <el...@gmail.com>.
Chandrajeet Padhy wrote:
> Hi All,
>
> I am having a trouble with the IoHandlerAdapter. I can see messages
> transmitting and only messageSent gets invoked. Even if there is a message
> reply it doesn't come into messageReceived method.
> Thus I reused the logging filter to handle message receipts as a work
> around. as below
> serviceConfig.getFilterChain().addLast("logger", new
> RFMessageFilter(eventHandlingStrategy));
>
> But, I want to switch off the log messages those gets printed at "INFO"
> level from org.apache.mina.util.SessionLog.
> How can I turn off the log messages or change the log level to not to print
> at all.
>
Mina's logger relies on slf4j which is a facade. Your application's
logger has to be configured in order to change the logs you'll get. So
if you are using Log4j, just modify your log4j configuration.
Here is a page which explains how to do that :
http://mina.apache.org/logging-configuration.html
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org