Java: Hur man omdirigera stderr och stdout till Commons Logging, med den anropande Class
println (x); } slutligen {lock.unlock (); }}Override Public void println (Objekt x) {lock.lock (); try {setNameOfCaller (lås); super.println (x); } slutligen {lock.unlock (); }}Override Public void println (String x) {lock.lock (); try {setNameOfCaller (lås); super.println (x); } slutligen {lock.unlock (); }}Override Public void write (byte [] b) kastar IOException {lock.lock (); try {setNameOfCaller (lås); super.write (b); } slutligen {lock.unlock (); }}Override Public void write (byte [] buf, int bort, int len) {lock.lock (); try {setNameOfCaller (lås); super.
write (buf, utanför, len); } slutligen {lock.unlock (); }}Override Public void write (int b) {lock.lock (); try {setNameOfCaller (lås); super.write (b); } slutligen {lock.unlock (); }}}