问题
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