+
+ public static Object printingToLogging(Function proc) {
+ SCLContext context = SCLContext.getCurrent();
+ SCLReportingHandler handler = (SCLReportingHandler)context.get(SCLReportingHandler.REPORTING_HANDLER);
+ if(handler == null)
+ handler = SCLReportingHandler.DEFAULT;
+
+ context.put(SCLReportingHandler.REPORTING_HANDLER, SCLReportingHandler.DEFAULT);
+
+ try {
+ return proc.apply(Tuple0.INSTANCE);
+ } finally {
+ context.put(SCLReportingHandler.REPORTING_HANDLER, handler);
+ }
+ }