Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug controller #15

Open
samdeane opened this issue May 24, 2014 · 2 comments
Open

Debug controller #15

samdeane opened this issue May 24, 2014 · 2 comments

Comments

@samdeane
Copy link
Contributor

Debug output is a bit spammy (although I noticed you've commented out the worst offender recently).

I'm thinking of adding a debugController alongside the printController and errorController, so that we can channel debug output elsewhere. I would then change the debug() macro to send the output through the controller for debug builds, but still do nothing for release builds.

Any thoughts/objections?

@ccgus
Copy link
Owner

ccgus commented May 24, 2014

I like the idea- but I'm not sure it should go through something like debugController - there will be cases where there isn't a controller to print things through (such as the preprocessor).

Instead, they could just be commented out or deleted. For years it's only been me working on the code, so that's what I did :)

Or maybe debug() should be given a level that's passed along with the macro?

@samdeane
Copy link
Contributor Author

I did wonder about that after I made the issue - hadn't actually checked to code to see how much of the debug output happened outside the context of a controller.

I would say to integrate ECLogging (but then I would say that wouldn't I). I can see why you wouldn't want to add more dependencies though.

Maybe a global controller, defaulting to one that uses NSLog if it's not set?

[COScript setDebugController:...]

Crude but effective...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants