The Borkware NSLog replacement seems like a rather a large amount of overkill and unnecessary clutter. __FILE__ and __LINE__ should always be implicit parameters instead of having to be passed into a method, every time. Not a MLog() wrapper that calls a singleton to make them implicit.
This way, I can log on debug builds only (add -DDEBUG as an "Other C Flag" to Xcode), and it gives me the method name that it was called on. Just enough context to be useful to track something down, not enough to cause a sea of output noise.
You can use any of the C preprocessor macro's[1] this way.
I personally like to define a Log() as:
This way, I can log on debug builds only (add -DDEBUG as an "Other C Flag" to Xcode), and it gives me the method name that it was called on. Just enough context to be useful to track something down, not enough to cause a sea of output noise.You can use any of the C preprocessor macro's[1] this way.
1. http://gcc.gnu.org/onlinedocs/gcc-3.1.1/cpp/Standard-Predefi...