/** * Set the destination for output from the fn:trace() function. * By default, the destination is System.err. If a TraceListener is in use, * this is ignored, and the trace() output is sent to the TraceListener. * * @param stream the PrintStream to which trace output will be sent. If set to * null, trace output is suppressed entirely. It is the caller's responsibility * to close the stream after use. * @since 9.1. Changed in 9.6 to use a Logger */ public void setTraceFunctionDestination(Logger stream) { context.setTraceFunctionDestination(stream); }
/** * Set the destination for output from the fn:trace() function. * By default, the destination is System.err. If a TraceListener is in use, * this is ignored, and the trace() output is sent to the TraceListener. * * @param stream the PrintStream to which trace output will be sent. If set to * null, trace output is suppressed entirely. It is the caller's responsibility * to close the stream after use. * @since 9.1. Changed in 9.6 to use a Logger */ public void setTraceFunctionDestination(Logger stream) { context.setTraceFunctionDestination(stream); }
dynamicEnv.setTraceFunctionDestination(System.out); } else if (value.equals("#null")) { dynamicEnv.setTraceFunctionDestination(null); } else { try { dynamicEnv.setTraceFunctionDestination( new PrintStream(new FileOutputStream(new File(value)))); closeTraceDestination = true;