Before I reinvent the wheel - I want to be able to insert debugging traces in my code, such as say("We are here.");
, without defining static void say()
in every class. It needs to do System.out.println(s)
, and to be globally switched on or off (doSay(false)
), and I'd also like it to be able to identify the class from which it's being invoked (as described here). For example:
MyClass: We are here.
Does Java already have such a tool?