head	1.8;
access;
symbols;
locks
	nobody:1.8; strict;
comment	@# @;


1.8
date	99.08.23.19.48.44;	author nobody;	state Exp;
branches;
next	1.7;

1.7
date	99.08.23.19.44.47;	author nobody;	state Exp;
branches;
next	1.6;

1.6
date	99.08.23.19.44.42;	author nobody;	state Exp;
branches;
next	1.5;

1.5
date	99.08.22.16.36.16;	author nobody;	state Exp;
branches;
next	1.4;

1.4
date	99.08.22.16.35.18;	author nobody;	state Exp;
branches;
next	1.3;

1.3
date	99.08.22.16.32.41;	author nobody;	state Exp;
branches;
next	1.2;

1.2
date	99.08.22.16.32.03;	author nobody;	state Exp;
branches;
next	1.1;

1.1
date	99.08.22.16.31.51;	author nobody;	state Exp;
branches;
next	;


desc
@null
@


1.8
log
@null
@
text
@IDependOn-Set: 1
IDependOn-Set: 284
IDependOn-Set: 288
IDependOn-Set: 289
IDependOn-Set: trash
LastModifiedSecs: 935437487
Parent: trash
SequenceNumber: 3
Title: Logging Servlet Output
Part: 0
Author-Set: brett@@knightsofthenet.com
LastModifiedSecs: 935339776
Type: monospaced
Lines: 26
> Whilst developing servlets my development 
> team often put System.err.println() statements in the servlet code. 
> Unfortunately, these error strings always get printed to main apache
> error log and not the virtual host or servlet zone's error log. Has anyone
> encountered this problem before and found a solution to isolate the errorlog output. 

have them use 

log("error string); 

or
getServletContext.log(e, "an error ");


or
use the following and write the error stack trace back to the browser or to the log.

        /* PrintStackTraceAsString from com.oreilly.servletServletUtils from 
                Java Servlet Programming, by Jason Hunter and William Crawford, O'Reilly, 1998 
        */
        public String getStackTraceAsString(Exception e){
                ByteArrayOutputStream bytes = new ByteArrayOutputStream();
                PrintWriter writer = new PrintWriter(bytes, true);
                e.printStackTrace(writer);
                return bytes.toString();
        }
EndPart: 0
@


1.7
log
@null
@
text
@d3 1
@


1.6
log
@null
@
text
@d2 1
a2 1
IDependOn-Set: 2
d4 3
a6 3
IDependOn-Set: 7
LastModifiedSecs: 935339776
Parent: 7
@


1.5
log
@null
@
text
@a2 1
IDependOn-Set: 288
@


1.4
log
@null
@
text
@d6 1
a6 1
LastModifiedSecs: 935339718
d8 1
a8 1
SequenceNumber: 2
d12 2
a13 1
LastModifiedSecs: 935339718
d15 1
a15 1
Whilst developing servlets my development 
@


1.3
log
@null
@
text
@d6 1
a6 1
LastModifiedSecs: 935339561
d8 1
a8 1
SequenceNumber: 1
d10 31
@


1.2
log
@null
@
text
@d6 1
a6 1
LastModifiedSecs: 935339509
d8 2
a9 2
SequenceNumber: 0
Title: New Item
@


1.1
log
@null
@
text
@d3 1
@
