4 ms·
Replace System.out with an object that responds to all of the same methods, but which does something clever with them. For instance one that adds timestamps on
by btilly 17y ago
Replace System.out with an object that responds to all of the same methods, but which does something clever with them. For instance one that adds timestamps on output, logs stuff somewhere, filters, etc.
This is a very powerful trick. However the downside is that it is in the category of things where only one person gets to be clever. Because the second person to replace that object breaks the first. So they decided to discourage that.