On 23.06.2011 16:58, Dylan Scott wrote:
I'm wondering if it's possible to setup a FileAppender to not open its file
(and thus create it if it doesn't exist yet) until it actually logs
something. I have an application which uses a different log file for each
run (using the same was causing problems with multiple instances of the
application running concurrently), but this means I end up with lots of
empty log files.
I'd like this capability to be added too. In fact, in my opinion, it is a bug,
that the files are opened "in advance". Unix' openlog() would not connect to the
local syslogd, for example, unless asked to do that with the LOG_NDELAY flag.
In my case the two parts of the application (server and client) were using the
same log4j.conf and insisted on opening all of each other's files (even though
class-specific logging settings ensured, neither side would ever have anything
to write into the file of the other). Because the sides are running as different
users, the file-openings would fail resulting in noisy stack-dumps...
-mi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]