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

Support debug logging (#1150) #1207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abolfazlghalandary
Copy link

Closes #1150
I'm solving this issue as a "good first issue". Since I have little experience on frontend, and this is one of my first contributions, I appreciate any step-by-step help to make this PR applicable for merging.

Thanks!

Copy link
Member

@jason0x43 jason0x43 left a comment

Choose a reason for hiding this comment

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

Hi, and thanks for contributing! You should be able to simplify this one a bit. The reporter itself doesn't need to worry about whether debug mode is enabled, it just needs to handle log events.

@@ -22,6 +28,13 @@ export default class ConsoleReporter extends Reporter {
this.console.error(this.formatError(error));
}

@eventHandler()
log(data: any) {
if (this._debugLogs) {
Copy link
Member

Choose a reason for hiding this comment

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

The reporter doesn't actually need to check any sort of debug condition. Other parts of Intern handle that (see log in src/lib/executors/Executor.ts), so the Console reporter should simply need to implement a handler for the log event.

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

Successfully merging this pull request may close these issues.

Support debug logging in browser console output
2 participants