# log4j problem



## scograf (Oct 14, 2011)

I have a problem with log4j. After installing and removing the ports


```
linux-sun-jdk16
linux-base-f10
tomcat6
```
on FreeBSD 8.2.

I reinstalled diablo-jdk 1.6 and tomcat6. All works fine but when I install log4j and common-logging ports I'm not able to configure log4j to write in tomcat catalina.out log file. I inserted my log4j.properties file in the /usr/local/apache-tomcat6.0/lib but nothing happens. 

This is my log4j.properties file and it works fine with tomcat on redhat, but nothing here.


```
log4j.rootLogger=INFO, APPENDER_OUT, R
#APPENDER_OUT
log4j.appender.APPENDER_OUT=org.apache.log4j.ConsoleAppender
log4j.appender.APPENDER_OUT.layout=org.apache.log4j.PatternLayout
log4j.appender.APPENDER_OUT.layout.ConversionPattern=[%5p: %F %t line %L:%d{ dd/MM/yyyy HH:mm}]%m%n
log4j.appender.APPENDER_OUT.Target=System.out
#R
log4j.appender.R=org.apache.log4j.RollingFileAppender 
log4j.appender.R.File=/usr/local/apache-tomcat-6.0/logs/catalina.out
log4j.appender.R.MaxFileSize=2MB 
log4j.appender.R.MaxBackupIndex=250 
log4j.appender.R.layout=org.apache.log4j.PatternLayout 
log4j.appender.R.layout.ConversionPattern=%-5p %d [%t] %c: %m%n
```

I'm new on FreeBSD, please help.


----------



## scograf (Oct 17, 2011)

I tried to reinstall all. I reinstalled FreeBSD 8.2, diablo jdk 1.6 and tomcat, but log4j doesn't work yet. The problem wasn't the previous sun-jdk installation. No one is able to use log4j?


----------

