J
Juergen Weber
Hi,
from a bean called from a jsp I tried to System.setOut to a
ByteArrayOutputStream and then call an application via X.main.
X logs via log4j. I exspected, that X's log would now go into the
ByteArrayOutputStream, but it still goes to the console log output.
How can
that be?
Also, it seemed to happen, that on further calls from the jsp, log4j
would
no longer work for X at all, there was no output any more.
So I wonder, if I should start X via Runtime.exec(), but it seems like
a waste of ressources to start a VM if I just could call main(). But
as it seems, an app ran with log4j needs its own VM.
Juergen
from a bean called from a jsp I tried to System.setOut to a
ByteArrayOutputStream and then call an application via X.main.
X logs via log4j. I exspected, that X's log would now go into the
ByteArrayOutputStream, but it still goes to the console log output.
How can
that be?
Also, it seemed to happen, that on further calls from the jsp, log4j
would
no longer work for X at all, there was no output any more.
So I wonder, if I should start X via Runtime.exec(), but it seems like
a waste of ressources to start a VM if I just could call main(). But
as it seems, an app ran with log4j needs its own VM.
Juergen