[log4perl-devel] redirect system command STDERR to log4perl

2007-11-21 Thread John Dunbar
Dear log4perl users, I am new to log4perl, I have search quite lot in FAQ and docs, but didnt't find the answer. How could I redirect the STDERR output of script executed through system() to logger? At the moment I use logging to file, but I would like to move it log4perl. Now: system "command 2>

Re: [log4perl-devel] redirect system command STDERR to log4perl

2007-11-21 Thread Kevin M. Goess
John Dunbar wrote: > Now: system "command 2>>errors.log"; > I would like to redirect that error output to logger. Well, the safest and most direct way would be to replace/augment all the prints to STDERR (like "warn" and "die") inside your script with log4perl logger calls. Or you could pipe the

Re: [log4perl-devel] redirect system command STDERR to log4perl

2007-11-21 Thread Kevin M. Goess
John Dunbar wrote: > Kevin, thank you for comprehensive reply. > >> Well, the safest and most direct way would be to replace/augment all the >> prints to STDERR (like "warn" and "die") inside your script with >> log4perl logger calls. > > I would prefer this solution, but how can I the redirect w

Re: [log4perl-devel] redirect system command STDERR to log4perl

2007-11-21 Thread John Dunbar
Kevin, thank you for comprehensive reply. > Well, the safest and most direct way would be to replace/augment all the > prints to STDERR (like "warn" and "die") inside your script with > log4perl logger calls. I would prefer this solution, but how can I the redirect whole output (or STDERR atleast