-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add debug system to Log class #110
Conversation
I'm not sure what this is gaining us... The application can choose which events to emit, but it can also just choose when to log in the current system, no? |
Actually, thinking about this a bit further, I'd really rather not go in this direction. It's turning the logger into a generic pub/sub event system, which could lead to a maintenance nightmare, e.g. what's to stop people form just putting non-logging code in in the handler? log.setEventHandlers({
'model_event': (model) => model.setUniforms(...);
'other_event': (resource) => resource.delete();
}); My feelings are that:
|
Yes good question... trying to articulate the potential pros of this system:
Cons:
|
That is a fair concern, though if we want debugging code to be dynamically loadable, aren't we are going to need something along these lines? Perhaps we could redesign or add some safeties?
|
I don't see how an event system would help... what do we get from it that isn't accomplished by just making the logging conditional?
Maybe we should have a conversation about this? I'm starting the feel the problem definition isn't completely clear for this work... |
Yes sounds good. I didn't see you on the deck.gl slack channel, maybe start there? |
I get the concern about making this a generic system. After some cleaning up it doesn't look so bad living in the module itself: https://github.com/uber/deck.gl/pull/3957/files#diff-8f29c94ea19bb5f1fb8ced597e0b8305 So I'd rather not land this in probe for now until we have a better understanding of the goals. |
Understood and this is fine with me. |
👍 |
Follow up of the discussion on visgl/deck.gl#3957