EJB and log4j

I have tiny module which would write messages to a log file whenever a request message is received in the onMessage() method, the file name of this log file contains date, hence a different log file would be created daily. The problem is it seems like log4j is still referring to the and writing to the same log file as well as the new one. Say I restart my server yesterday (20060903), today's log message would still get write to both 20060903 and 20060904, eventually it would run into problem such as too many files opened. Can anyone help ? Thanks in advance!

[572 byte] By [mpanga] at [2007-10-3 4:11:09]
# 1

That seems to be more of a problem with your log4j configuration than anything else.

You should not have an issue with configuring daily rolling log files with log4j.

Ofd course, log4j will only roll log files when it is active at the time of the rollover...

Also, check the system limit on your file writing (ulimit command). It might be set too low.

karma-9a at 2007-7-14 22:11:36 > top of Java-index,Java Essentials,Java Programming...