logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dilan Agalawatta" <di...@waterfind.com.au>
Subject re:parser logging
Date Fri, 29 May 2009 01:46:37 GMT
Hello, im using resin 3.x with log4j, and I got following class;

 

import org.apache.log4j.Logger;

import com.sun.cnpi.rss.parser.RssParser;

 

 

public class ReadRssFeeds extends Thread {

 

 

private static Logger logger = Logger.getLogger(ReadRssFeeds.class);

 

public static ReadRssFeeds getReadRssFeeds(InputStream in) {

        ReadRssFeeds rsf = new ReadRssFeeds();

        RssParser parser = null;

        try {

            parser = RssParserFactory.createDefault();

        } catch (RssParserException ex) {

        }

        if (parser != null) {

            try {

                rsf.setRss(parser.parse(in));

            } catch (RssParserException ex) {

                logger.debug(ex);

            }

        }

        return rsf;

    }

 

 

}

 

I got some of the text (Info or warning) from parser  appear on my
resin.log, How do i forward that to the my application log which i set
up via log4j instead of resin.log

 

 

And my log4j settings are;

 

#application 

log4j.appender.AppLog=org.apache.log4j.DailyRollingFileAppender

log4j.appender. AppLog.file=/server/decsep/webapp/WEB-INF/log/app.log

log4j.appender. AppLog.datePattern='.'yyyy-MM-dd

log4j.appender. AppLog.layout=org.apache.log4j.PatternLayout

log4j.appender. AppLog.layout.ConversionPattern=%r %d{ISO8601} [%t] %-5p
%c %x- %m\r\n

 

 

thanks,

Dilan

 

 


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