On 04/11/2012 12:25, Aleksey Shipilev wrote:
.....class IoTrace { public static final boolean ENABLED = System.getProperty("java.io.trace"); } ...which will demote the flexibility of setListener(), but have much lower runtime overhead. This should be confirmed by microbenchmarking anyway.
+1 for this approach, if it provides sufficient functionality. -Chris.
-Aleksey.