logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amnon Lahav" <amnon.la...@gmail.com>
Subject log.info prints exceptios
Date Mon, 05 Nov 2007 22:11:49 GMT
Hi , i've configured a log per level info.log warn.log error.log and put 
them in the correct places (or so i tough) and for some reason info prints 
exceptions allso
log4j.threshold=ALL

log4j.rootLogger= INFO , InfoAppender, WarnAppender,ErrorAppender


log4j.appender.InfoAppender=org.apache.log4j.RollingFileAppender

log4j.appender.InfoAppender.File=info.log

log4j.appender.InfoAppender.MaxFileSize=1MB

log4j.appender.InfoAppender.MaxBackupIndex=3

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

log4j.appender.InfoAppender.layout.ConversionPattern=%c %M %d{ISO8601} --  
%p -- %m%n

log4j.appender.InfoAppender.Threshold=INFO


log4j.appender.WarnAppender=org.apache.log4j.RollingFileAppender

log4j.appender.WarnAppender.File=warn.log

log4j.appender.WarnAppender.MaxFileSize=1MB

log4j.appender.WarnAppender.MaxBackupIndex=3

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

log4j.appender.WarnAppender.layout.ConversionPattern=%c %M %d{ISO8601} --  
%p -- %m %n

log4j.appender.WarnAppender.Threshold=WARN


log4j.appender.ErrorAppender=org.apache.log4j.RollingFileAppender

log4j.appender.ErrorAppender.File=error.log

log4j.appender.ErrorAppender.MaxFileSize=1MB

log4j.appender.ErrorAppender.MaxBackupIndex=3

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

log4j.appender.ErrorAppender.layout.ConversionPattern=%c %M %d{ISO8601} --  
%p --%m%n

log4j.appender.ErrorAppender.Threshold=ERROR





here is s piece of code for example which i tough should act like i tough 
and it doesn't

try{

logger.info("enter");

if ( genericTradingTimes.isTradingDay()

&& !genericTradingTimes.isHoliday(new Date(System.currentTimeMillis()))

&& genericTradingTimes.isTradingTime(new Date(System.currentTimeMillis()))

)

{

dataSourceLogic.setUrl(new String[]{});

List<SimplePaperIntraDay> list = dataSourceLogic.parseSourceToEntities();

simplePaperIntraDayService.saveNewList(list);

}

logger.info("Exit  ");

}

catch (Exception e) {

logger.error(e);

throw new JobExecutionException(e);

}

when exceptions are thrown from within the info try catch they still get 
printed out in the info log and not in the warn , the wanr allso prints them 
but i don't want info.log to do it as well ?

thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message