Redirecting log information
Tom Schindl
tom.schindl at bestsolution.at
Tue May 8 05:19:57 PDT 2012
Hi,
The problem is the point at which one redirects the stderr. Take a look
at this:
> public class TestApp extends Application {
>
> @Override
> public void start(Stage primaryStage) {
> ByteArrayOutputStream out = new ByteArrayOutputStream();
> PrintStream orig = System.err;
> System.setErr(new PrintStream(out)); // Works
>
vs.
> public class TestApp extends Application {
>
> @Override
> public void start(Stage primaryStage) {
> ByteArrayOutputStream out = new ByteArrayOutputStream();
> PrintStream orig = System.err;
>
> Group g = new Group();
> System.setErr(new PrintStream(out)); // Does not work
The problem is that Option 1 is not possible for me because I only have
to redirect the logging information from JavaFX while your solution
completely redirects STDERR with is not making much sense!
Sad enough the Logging code is not yet opensourced so I still hope that
a JavaFX dev with access to the code can help me.
So I repeat my question. Can I somehow set a custom logger to the JavaFX
platform?
Tom
Am 08.05.12 00:22, schrieb Tom Schindl:
> I've tried that already and couldn't make it work. Did you try it and it
> worked? Then I'd give another try.
>
> Tom
>
> Am 08.05.12 00:25, schrieb Christian Schudt:
>> You can redirect the System.err stream to your logger.
>>
>> See here:
>>
>> https://forums.oracle.com/forums/thread.jspa?messageID=10304321
>> http://stackoverflow.com/questions/1200175/log4j-redirect-stdout-to-dailyrollingfileappender/1370033#1370033
>>
>> Christian
>>
>>
>> Am 07.05.2012 um 23:06 schrieb Tom Schindl:
>>
>>> Hi,
>>>
>>> I'm having a hard time redirecting log output generated by JavaFX
>>> library. Is there some API available or documentation?
>>>
>>> Tom
>>>
>>> --
>>> B e s t S o l u t i o n . a t EDV Systemhaus GmbH
>>> ------------------------------------------------------------------------
>>> tom schindl geschäftsführer/CEO
>>> ------------------------------------------------------------------------
>>> eduard-bodem-gasse 5-7/1 A-6020 innsbruck fax ++43 512 935833
>>> http://www.BestSolution.at phone ++43 512 935834
>>
>
>
--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl geschäftsführer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5-7/1 A-6020 innsbruck fax ++43 512 935833
http://www.BestSolution.at phone ++43 512 935834
More information about the openjfx-dev
mailing list