redirecting a java web start app logs to a file

会有一股神秘感。 提交于 2019-11-28 10:38:58

问题


We have an application that we access over Java web start internally at our office.

all the logs produced by the app are displayed in Firefox's console.

what I want to do is to redirect that to a file.

is that possible ?

and how to do that ?

P.S : the application is designed as follow : a client app that accesses an EJB on a server.

the client part is the one made available through java webstart.


回答1:


I figured using the System.setOut method could be used to redirect all System.out.println() outputs to a file.

Hence, this could be used in my app :

        System.setOut(new PrintStream("C:\\log.txt"));


来源:https://stackoverflow.com/questions/1472455/redirecting-a-java-web-start-app-logs-to-a-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!