You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Sungwon Jung <th...@gmail.com> on 2007/09/17 14:01:32 UTC

LoggingFilter() configuration

Hello. I'm using MINA 1.1.2.

I use LoggingFilter(). like this "cfg_acu.getFilterChain().addLast(
"logger", new LoggingFilter() );"

LoggingFilter() print message to console.
I want output log message to file not console.

is it possible?

thank you.

Re: LoggingFilter() configuration

Posted by Maarten Bosteels <mb...@gmail.com>.
There really is no need to do that since you
can easily make the existing LoggingFilter use log4j.

Please let us know which of your needs aren't covered by the existing
LoggingFilter.

Maarten


On 9/17/07, Sungwon Jung <th...@gmail.com> wrote:
>
> Thanks all!
>
> right now I'm make Log4JFilter() and it's working well.
> my console is clean now. :-)
>
> --
> import org.apache.log4j.*;
>
> public class Log4JFilter extends IoFilterAdapter {
>   ...
> }
> --
>
>
> On 9/17/07, Maarten Bosteels <mb...@gmail.com> wrote:
> > To use log4j, you need these jars on the classpath:
> >
> >  slf4j-api-1.4.3.jar
> >  slf4j-log4j12-1.4.3.jar
> >  log4j-1.2.x.jar
> >
> > see http://www.nabble.com/slf4j-logging-t4402442s16868.html
> >
> > Maarten
> >
> >
> > On 9/17/07, Mark <el...@gmail.com> wrote:
> > >
> > > Depending on the underlying logging system you are using, it
> depends.  If
> > > you are using Log4J, then you just need to configure a
> > > log4j.propertiesfile.  See the Log4J documentation for more
> > > information.
> > >
> > >
> > >
> > > On 9/17/07, Sungwon Jung <th...@gmail.com> wrote:
> > > >
> > > > Hello. I'm using MINA 1.1.2.
> > > >
> > > > I use LoggingFilter(). like this "cfg_acu.getFilterChain().addLast(
> > > > "logger", new LoggingFilter() );"
> > > >
> > > > LoggingFilter() print message to console.
> > > > I want output log message to file not console.
> > > >
> > > > is it possible?
> > > >
> > > > thank you.
> > > >
> > >
> > >
> > >
> > > --
> > > ..Cheers
> > > Mark
>

Re: LoggingFilter() configuration

Posted by kwtan <ka...@yahoo.com>.
Jung,

can u give me the sample of your properties file, thanks! 

Kelvin


Sungwon Jung wrote:
> 
> Thanks all!
> 
> right now I'm make Log4JFilter() and it's working well.
> my console is clean now. :-)
> 
> --
> import org.apache.log4j.*;
> 
> public class Log4JFilter extends IoFilterAdapter {
>   ...
> }
> --
> 
> 
> On 9/17/07, Maarten Bosteels <mb...@gmail.com> wrote:
>> To use log4j, you need these jars on the classpath:
>>
>>  slf4j-api-1.4.3.jar
>>  slf4j-log4j12-1.4.3.jar
>>  log4j-1.2.x.jar
>>
>> see http://www.nabble.com/slf4j-logging-t4402442s16868.html
>>
>> Maarten
>>
>>
>> On 9/17/07, Mark <el...@gmail.com> wrote:
>> >
>> > Depending on the underlying logging system you are using, it depends. 
>> If
>> > you are using Log4J, then you just need to configure a
>> > log4j.propertiesfile.  See the Log4J documentation for more
>> > information.
>> >
>> >
>> >
>> > On 9/17/07, Sungwon Jung <th...@gmail.com> wrote:
>> > >
>> > > Hello. I'm using MINA 1.1.2.
>> > >
>> > > I use LoggingFilter(). like this "cfg_acu.getFilterChain().addLast(
>> > > "logger", new LoggingFilter() );"
>> > >
>> > > LoggingFilter() print message to console.
>> > > I want output log message to file not console.
>> > >
>> > > is it possible?
>> > >
>> > > thank you.
>> > >
>> >
>> >
>> >
>> > --
>> > ..Cheers
>> > Mark
> 
> 

-- 
View this message in context: http://www.nabble.com/LoggingFilter%28%29-configuration-tf4466197s16868.html#a12896291
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: LoggingFilter() configuration

Posted by Sungwon Jung <th...@gmail.com>.
Thanks all!

right now I'm make Log4JFilter() and it's working well.
my console is clean now. :-)

--
import org.apache.log4j.*;

public class Log4JFilter extends IoFilterAdapter {
  ...
}
--


On 9/17/07, Maarten Bosteels <mb...@gmail.com> wrote:
> To use log4j, you need these jars on the classpath:
>
>  slf4j-api-1.4.3.jar
>  slf4j-log4j12-1.4.3.jar
>  log4j-1.2.x.jar
>
> see http://www.nabble.com/slf4j-logging-t4402442s16868.html
>
> Maarten
>
>
> On 9/17/07, Mark <el...@gmail.com> wrote:
> >
> > Depending on the underlying logging system you are using, it depends.  If
> > you are using Log4J, then you just need to configure a
> > log4j.propertiesfile.  See the Log4J documentation for more
> > information.
> >
> >
> >
> > On 9/17/07, Sungwon Jung <th...@gmail.com> wrote:
> > >
> > > Hello. I'm using MINA 1.1.2.
> > >
> > > I use LoggingFilter(). like this "cfg_acu.getFilterChain().addLast(
> > > "logger", new LoggingFilter() );"
> > >
> > > LoggingFilter() print message to console.
> > > I want output log message to file not console.
> > >
> > > is it possible?
> > >
> > > thank you.
> > >
> >
> >
> >
> > --
> > ..Cheers
> > Mark

Re: LoggingFilter() configuration

Posted by Maarten Bosteels <mb...@gmail.com>.
To use log4j, you need these jars on the classpath:

  slf4j-api-1.4.3.jar
  slf4j-log4j12-1.4.3.jar
  log4j-1.2.x.jar

see http://www.nabble.com/slf4j-logging-t4402442s16868.html

Maarten


On 9/17/07, Mark <el...@gmail.com> wrote:
>
> Depending on the underlying logging system you are using, it depends.  If
> you are using Log4J, then you just need to configure a
> log4j.propertiesfile.  See the Log4J documentation for more
> information.
>
>
>
> On 9/17/07, Sungwon Jung <th...@gmail.com> wrote:
> >
> > Hello. I'm using MINA 1.1.2.
> >
> > I use LoggingFilter(). like this "cfg_acu.getFilterChain().addLast(
> > "logger", new LoggingFilter() );"
> >
> > LoggingFilter() print message to console.
> > I want output log message to file not console.
> >
> > is it possible?
> >
> > thank you.
> >
>
>
>
> --
> ..Cheers
> Mark
>

Re: LoggingFilter() configuration

Posted by Mark <el...@gmail.com>.
Depending on the underlying logging system you are using, it depends.  If
you are using Log4J, then you just need to configure a
log4j.propertiesfile.  See the Log4J documentation for more
information.



On 9/17/07, Sungwon Jung <th...@gmail.com> wrote:
>
> Hello. I'm using MINA 1.1.2.
>
> I use LoggingFilter(). like this "cfg_acu.getFilterChain().addLast(
> "logger", new LoggingFilter() );"
>
> LoggingFilter() print message to console.
> I want output log message to file not console.
>
> is it possible?
>
> thank you.
>



-- 
..Cheers
Mark