you may want to consider piping stderr and stdout to the apache rotatelogs program. ■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER (269) 923-5278 // [email protected] "A wrong note played hesitatingly is a wrong note. A wrong note played with conviction is interpretation."
Umesh Paliwal <[email protected]> 01/17/2012 06:27 AM Please respond to "Log4J Users List" <[email protected]> To Log4J Users List <[email protected]> cc Subject RE: redirecting Stdout and stderr to a different log file We already have this implemented. But the problem is that we are not able to maintain the files and after few days the file size becomes too large to be opened. Hence looking for a solution with Log4j . I have a solution using java.util.logging but since we are using Log4j for our logging I am just exploring a way out using log4j . -----Original Message----- From: Douglas E Wegscheid [mailto:[email protected]] Sent: Tuesday, January 17, 2012 4:48 PM To: Log4J Users List Cc: Log4J Users List Subject: RE: redirecting Stdout and stderr to a different log file is log4j necessary? will java -jar foo.jar > sysout.txt 2> syserr.txt suffice? ■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER (269) 923-5278 // [email protected] "A wrong note played hesitatingly is a wrong note. A wrong note played with conviction is interpretation." Umesh Paliwal <[email protected]> 01/17/2012 12:57 AM Please respond to "Log4J Users List" <[email protected]> To Log4J Users List <[email protected]> cc Subject RE: redirecting Stdout and stderr to a different log file Hi Himanshu, I am able to redirect the sysouts and syserr to a file. But I need them in a individual file so that it is not combined with other logs. Can you help me out Regards, Umesh -----Original Message----- From: Himanshu Gupta [mailto:[email protected]] Sent: Tuesday, January 17, 2012 11:27 AM To: 'Log4J Users List' Subject: RE: redirecting Stdout and stderr to a different log file Hi Umesh, You can write a SysOutErrRedirector which can take out and err streams and use log4j root logger (or any other defined logger) to move it to the associated appender. Thanks, Himanshu -----Original Message----- From: Umesh Paliwal [mailto:[email protected]] Sent: Monday, January 16, 2012 9:38 PM To: [email protected] Subject: RE: redirecting Stdout and stderr to a different log file Can anyone help me on the issue below. Please From: Umesh Paliwal Sent: Tuesday, January 10, 2012 9:47 AM To: '[email protected]' Subject: redirecting Stdout and stderr to a different log file Hi All, We have lot many sysouts in our project. The sysout are captured in file by using a redirect operator when we launch the server. The maintanence of the files a big issue as these logs keep on growing. Can you please help me find out a strategy if I can redirect all the sysout and stderr into a logging file using log4j. Thanks and regards, Umesh Paliwal The information contained in this e-mail is private & confidential and may also be legally privileged. If you are not the intended recipient, please notify us, preferably by e-mail, and do not read, copy or disclose the contents of this message to anyone. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] The information contained in this e-mail is private & confidential and may also be legally privileged. If you are not the intended recipient, please notify us, preferably by e-mail, and do not read, copy or disclose the contents of this message to anyone. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] The information contained in this e-mail is private & confidential and may also be legally privileged. If you are not the intended recipient, please notify us, preferably by e-mail, and do not read, copy or disclose the contents of this message to anyone.
