Hi

  I am using log4j once of my biggest issue is  my messages are routed to both 
sysout and log file.

 I use the following code to create logger object. I have not attached my 
config file instead i m hardcoding the values

cat = Category.getInstance(application name);
Layout layout = new PatternLayout("%d %c %-5p - %m%n");
async.addAppender(new DailyRollingFileAppender(
                                        layout, "application.log","'.'yyyy-MM-
dd"));

cat.addAppender(async);
cat.setPriority(Priority.toPriority("ERROR"));


above code has been used.

 This code runs in websphere app server. And my web application uses many other 
jar files like axis.jar and commons-logging.jar. 

I donot understand why my logs are getting written into both application log 
and Sysout log

Please suggest me some idea

if i use the below code .will it solve the problem
cat.setAddivity(false)

Thanks
Rajesh.J


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to