Skip to content

Adds Logging and Debugging Context API#753

Open
pzuraq wants to merge 2 commits into
mainfrom
logging-and-debugging-context-api
Open

Adds Logging and Debugging Context API#753
pzuraq wants to merge 2 commits into
mainfrom
logging-and-debugging-context-api

Conversation

@pzuraq

@pzuraq pzuraq commented Jun 15, 2021

Copy link
Copy Markdown
Contributor

This would likely be very costly from a performance perspective, and would
likely be prohibitive.

- We could only ship this API in development and not production, relaxing the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could there be an option to opt in to stripping this or other apis(?) out only in production?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the cost here would be minimal enough that it won't really matter, and I think there could be broader repercussions to consider if we allowed that. For instance, some apps/addons may assume it exists, and stop working if it does not. I also worry about increasing implementation cost, and increased cost for Embroider to add another config option. That said, I'm open to the idea, would definitely like to see what others think about it.

individual objects. When one is found, it is called and passed the object that
`getDebuggingContext` was called on.

### setDebuggingContextGenerator

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update to include information about what happens if setDebuggingContextGenerator is called twice?

## Motivation

Currently, it can be pretty difficult to understand what caused an error within
an Ember application. Errors can occur almost anywhere at any time. They can be

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems extremely useful for ember-data!

@wagenet

wagenet commented Jul 23, 2022

Copy link
Copy Markdown
Member

The general idea here seems really useful. Is there still interest in moving this forwards?

@chriskrycho chriskrycho added the S-Exploring In the Exploring RFC Stage label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-Exploring In the Exploring RFC Stage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants