Java: Hvordan omdirigere stderr og standard ut til Commons Logging, With The Calling Class
rintln (x); } finally {lock.unlock (); }}Override Public void println (String x) {lock.lock (); try {setNameOfCaller (lock); super.println (x); } finally {lock.unlock (); }}Override Public void write (byte [] b) kaster IOException {lock.lock (); try {setNameOfCaller (lock); super.write (b); } finally {lock.unlock (); }}Override Public void write (byte [] buf, int off, int len) {lock.lock (); try {setNameOfCaller (lock); super.write (buf, av, len); } finally {lock.unlock (); }}Override Public void write (int b) {lock.lock (); try {setNameOfCaller (lock); super.write (b); } finally {lock.
unlock (); }}}