The Artima Developer Community
Sponsored Link

Java Answers Forum
System.out, System.err to FileWriter

2 replies on 1 page. Most recent reply: Apr 3, 2003 3:07 PM by Lee Slaughter

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Lee Slaughter

Posts: 2
Nickname: sparkylee
Registered: Apr, 2003

System.out, System.err to FileWriter Posted: Apr 1, 2003 5:20 PM
Reply to this message Reply
Advertisement
I have lots of (toggled) debug output I don't want to rewrite, just want to be able to write it to a file.
I don't mean %foo > error.txt 2>&1
I want to assign System.err to a FileOutputStream (but can't) but that's the general idea.

Shouldn't be that hard.
Thanks.
Lee Slaughter


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: System.out, System.err to FileWriter Posted: Apr 2, 2003 11:35 AM
Reply to this message Reply
Use System.setErr().

Lee Slaughter

Posts: 2
Nickname: sparkylee
Registered: Apr, 2003

Re: System.out, System.err to FileWriter Posted: Apr 3, 2003 3:07 PM
Reply to this message Reply
thanks.

Flat View: This topic has 2 replies on 1 page
Topic: Reading files in a folder Previous Topic   Next Topic Topic: Share jsp pages between wars inside an ear

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use