Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #18378 > unrolled thread

trying to redirect both std out and err to a file together and still err to a separate file

Started byqwertmonkey@syberianoutpost.ru
First post2012-08-29 02:58 +0000
Last post2012-08-29 00:28 -0700
Articles 2 — 2 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  trying to redirect both std out and err to a file together and still err to a separate file qwertmonkey@syberianoutpost.ru - 2012-08-29 02:58 +0000
    Re: trying to redirect both std out and err to a file together and still err to a separate file Roedy Green <see_website@mindprod.com.invalid> - 2012-08-29 00:28 -0700

#18378 — trying to redirect both std out and err to a file together and still err to a separate file

Fromqwertmonkey@syberianoutpost.ru
Date2012-08-29 02:58 +0000
Subjecttrying to redirect both std out and err to a file together and still err to a separate file
Message-ID<k1k0h5$jt5$1@speranza.aioe.org>
 Lew you are right the thread started on comp.unix.shell. It does however
related to java.
~ 
 The thing is that sometimes I would (within java) redirect out and/or err 
to files but sometimes I need for out and err to log to the same file and err 
still to a different/separate one. I haven't figured out how to do that 
cleanly/easily in java.
~ 
 The shell, however, seems to come handy in such cases. In fact as I found out,
things aren't that simple on the shell either (comp.unix.shell: Lem Novantotto ...),
so it is best if those guys sort it out themselves
~ 
 lbrtchx
 comp.lang.java.programmer: trying to redirect both std out and err to a file
together and still err to a separate file

[toc] | [next] | [standalone]


#18383

FromRoedy Green <see_website@mindprod.com.invalid>
Date2012-08-29 00:28 -0700
Message-ID<ssgr38la6v42o4qi6ktd09sidhhbknj202@4ax.com>
In reply to#18378
On Wed, 29 Aug 2012 02:58:45 +0000 (UTC),
qwertmonkey@syberianoutpost.ru wrote, quoted or indirectly quoted
someone who said :

> Lew you are right the thread started on comp.unix.shell. It does however
>related to java

If you do it with a shell, you potentially need a different script for
each platform. If you do it inside the Java program, it works
everywhere.  However, it is usually easier to modify a shell than a
Java program.

see System.setErr System.setOut
-- 
Roedy Green Canadian Mind Products http://mindprod.com
A new scientific truth does not triumph by convincing its opponents and making them see the light,
but rather because its opponents eventually die, and a new generation grows up that is familiar with it.
~ Max Planck 1858-04-23 1947-10-04 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web