For the more experienced programmers in the community: what are some best practices for logging debug-type data in C3?
I use some simple logging in my code for debugging purposes. Basically I have the simple function below that prints to a text object, which is in a layer called 'debugLayer'. Every layout in my game has a 'debugLayer' layer, and pressing the 'd' key toggles visibility of that layer. I call printToErrorText throughout the code to log what I feel may be helpful or relevant for debugging, but other than calling it once at the beginning of every function (with the function name and parameter values as the str argument) I don't have any consistent rules on when to use it.
This method has been helpful, but I have to think there are better ways to tackle logging with C3. Would love to hear what's been working for the C3 veterans out there.