flushing system.out
i'm printing stuff out to system.out in tomcat, but it doesn't get flushed till the end of the request. (i've tried system.out.flush()) has anyone got solutions to this problem? i'm not sure if its a tomcat problem or some OS / jvm thing... thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: flushing system.out
Can u tell me which OS ure using and what version of Tomcat On 6/16/06, Nishant Deshpande <[EMAIL PROTECTED]> wrote: i'm printing stuff out to system.out in tomcat, but it doesn't get flushed till the end of the request. (i've tried system.out.flush()) has anyone got solutions to this problem? i'm not sure if its a tomcat problem or some OS / jvm thing... thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mir Kasim Ali
Re: flushing system.out
I doubt you want to print to system.out in a servlet (or jsp). Odds are you want flushBuffer http://tomcat.apache.org/tomcat-5.0-doc/servletapi/javax/servlet/ServletResponseWrapper.html#flushBuffer() or flush http://tomcat.apache.org/tomcat-5.0-doc/jspapi/javax/servlet/jsp/JspWriter.html#flush() -Tim Nishant Deshpande wrote: i'm printing stuff out to system.out in tomcat, but it doesn't get flushed till the end of the request. (i've tried system.out.flush()) has anyone got solutions to this problem? i'm not sure if its a tomcat problem or some OS / jvm thing... - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: flushing system.out
I frequently see it used for debugging. It's an easy place to log to. That's also when you most want unbuffered output. Is that practice discommended for other reasons? -- Glenn Holliday Computer Sciences Corporation [EMAIL PROTECTED] 540-644-6636 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. Tim Funk <[EMAIL PROTECTED]> 06/16/2006 07:14 AM Please respond to "Tomcat Users List" To Tomcat Users List cc Subject Re: flushing system.out I doubt you want to print to system.out in a servlet (or jsp). - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: flushing system.out
System.out.println is a synchronized call, and will become a performance bottleneck on highly concurrent applications, the ideal is to use a logging framework, and setup an async logger Filip Glenn Holliday wrote: I frequently see it used for debugging. It's an easy place to log to. That's also when you most want unbuffered output. Is that practice discommended for other reasons? -- Glenn Holliday Computer Sciences Corporation [EMAIL PROTECTED] 540-644-6636 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. Tim Funk <[EMAIL PROTECTED]> 06/16/2006 07:14 AM Please respond to "Tomcat Users List" To Tomcat Users List cc Subject Re: flushing system.out I doubt you want to print to system.out in a servlet (or jsp). - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Filip Hanik - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: flushing system.out
I agree, and also suggest that usually, you don't want debugging turned on in a highly concurrent environment. Or other high volume environments, or for production in general. At least, not that kind of shotgun debugging. But it can be helpful when you encounter a 1-minute question and answer during development or testing. -- Glenn Holliday Computer Sciences Corporation [EMAIL PROTECTED] 540-644-6636 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. Filip Hanik - Dev Lists <[EMAIL PROTECTED]> 06/16/2006 08:45 AM Please respond to "Tomcat Users List" To Tomcat Users List cc Subject Re: flushing system.out System.out.println is a synchronized call, and will become a performance bottleneck on highly concurrent applications, the ideal is to use a logging framework, and setup an async logger Filip Glenn Holliday wrote: > I frequently see it used for debugging. It's an easy place to log to. > That's also when you most want unbuffered output. Is that practice > discommended for other reasons? > > Tim Funk <[EMAIL PROTECTED]> > 06/16/2006 07:14 AM > Please respond to > "Tomcat Users List" > > > To > Tomcat Users List > cc > > Subject > Re: flushing system.out > > > > > > > I doubt you want to print to system.out in a servlet (or jsp). > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: flushing system.out
I'm using Tomcat 5.0.28 and SuSe Linux 9.3 On 6/15/06, Mir Kasim Ali <[EMAIL PROTECTED]> wrote: Can u tell me which OS ure using and what version of Tomcat On 6/16/06, Nishant Deshpande <[EMAIL PROTECTED]> wrote: > > i'm printing stuff out to system.out in tomcat, but it doesn't get > flushed till the end of the request. > > (i've tried system.out.flush()) > > has anyone got solutions to this problem? i'm not sure if its a tomcat > problem or some OS / jvm thing... > > thanks > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Mir Kasim Ali - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]