org.lsst.ccs.utilities.tracers
Class Tracer.MultiReporter

java.lang.Object
  extended by org.lsst.ccs.utilities.tracers.Tracer.MultiReporter
All Implemented Interfaces:
Tracer.Strategy
Enclosing class:
Tracer

public static class Tracer.MultiReporter
extends Object
implements Tracer.Strategy

Convenience class to create a code that reports to many report "handlers". (for instance to a Logger AND System.out).


Constructor Summary
Tracer.MultiReporter(Tracer.Strategy... strategies)
           
 
Method Summary
 void addReportLine(String line)
          long reports that span many lines (such as stackTraces) may have intermediate calls to addReportLine before a call to endReport
 void endReport()
          marks the end of a trace (this can be used with implementations that use parenthesized expressions -such as XML-).
 void report(String report)
          starts a trace and reports a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tracer.MultiReporter

public Tracer.MultiReporter(Tracer.Strategy... strategies)
Method Detail

report

public void report(String report)
Description copied from interface: Tracer.Strategy
starts a trace and reports a String. Each "report" (mostly one line reports) is terminated by a call to endReport

Specified by:
report in interface Tracer.Strategy

addReportLine

public void addReportLine(String line)
Description copied from interface: Tracer.Strategy
long reports that span many lines (such as stackTraces) may have intermediate calls to addReportLine before a call to endReport

Specified by:
addReportLine in interface Tracer.Strategy

endReport

public void endReport()
Description copied from interface: Tracer.Strategy
marks the end of a trace (this can be used with implementations that use parenthesized expressions -such as XML-). it is guaranteed that each call to report is closed by a call to endReport (in the meantime many invocations to addReportLine may have been fired).

Specified by:
endReport in interface Tracer.Strategy


Copyright © 2013 LSST. All Rights Reserved.