Skip to content

updates to the logging view #30

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

Merged
merged 3 commits into from
Oct 1, 2018
Merged

Conversation

devoncarew
Copy link
Member

  • misc general improvements to the logging view
  • allow for asynchronously calculated log entry details (for when we need to query the VM for more details)
  • add a clear all button to the log view
  • when logging stdout text, delay 1ms to see if we get the newline associated with the current stdout message
  • make sure the log kind column doesn't become too wide

@DanTup

@devoncarew
Copy link
Member Author

screen shot 2018-09-30 at 3 50 30 pm

if (message.length > 200) {
summary = message.substring(0, 200) + '…';
}
summary = summary.replaceAll('\t', r'\t');
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason for these replacements? Won't replacing characters like this (for ex.) make an actual newline and the literal characters \n in the users log render the same in this view? This might complicate debugging, for ex. if your app showing a literal \n where you expected a newline?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good point - it would be hard to differentiate between a newline and a sequence of two \n chars.

Without this however, you won't know if you have whitespace chars in your output - they won't show in the rendering.

I'm not sure if there's a solution that covers both situations; if no, we likely want to make the whitespace chars visible.

Copy link
Contributor

Choose a reason for hiding this comment

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

Without this however, you won't know if you have whitespace chars in your output - they won't show in the rendering

Do you mean because they collapse in HTML? If so, don't the pre/whitespace settings help with that?

My concern here was that any manipulation of the data here could lose data - it'd be better to keep the raw string and deal with anything like this in the rendering as-appropriate? Fox ex. It might be important that the user can copy/paste an item from the log and have it as was printed verbatim?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean because they collapse in HTML? If so, don't the pre/whitespace settings help with that?

It would with the formatting aspect, but not w/ knowing whether it was a tab, several spaces, ...

I can remove this part and we can re-assess if this ever comes up as an issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

but not w/ knowing whether it was a tab, several spaces

Oh, gotcha! I guess this is no different to when the user prints and sees it written anywhere else so probably people are used to selecting/inspecting/copy&pasting to review, but we could consider a button that toggles rendering whitespace in the details?

Copy link
Member Author

Choose a reason for hiding this comment

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

we could consider a button that toggles rendering whitespace in the details

That sounds great - a good solution. It could be a raw data vs a rendering option, esp. for some log entries where we interpret the data (frame events, gc events, ...).

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 I added a note to the doc so this doesn't get forgotten (though we can start using issues here if you think makes more sense).

Copy link
Member Author

Choose a reason for hiding this comment

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

We should likely move the work we think we're likely to do from the doc into the issue tracker.

@devoncarew devoncarew merged commit f5a3930 into flutter:master Oct 1, 2018
hrajwade96 pushed a commit to hrajwade96/devtools that referenced this pull request Dec 18, 2024
Fix relative path for image to properly show on Pub
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.

2 participants