Skip to content

Send log messages to the constellation - #11841

Merged
bors-servo merged 1 commit into
servo:masterfrom
asajeffrey:constellation-logging
Jul 15, 2016
Merged

bors-servo merged 1 commit into
servo:masterfrom
asajeffrey:constellation-logging

Conversation

@asajeffrey

@asajeffrey asajeffrey commented Jun 23, 2016 •

Copy link
Copy Markdown
Contributor

Send all warnings and errors to the constellation. Warnings are bufferred up, and included in any subsequent error reports. Errors are reported in the same way as panics.

Note that this can't merge yet, as it needs rust-lang/log#86 to land.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix Include warnings in crash reports #11776 (github issue number if applicable).
  • These changes do not require tests because we don't test crash reporting.

This change is Reviewable

@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @KiChjang: components/script_traits/Cargo.toml, components/script_traits/Cargo.toml, components/script_traits/script_msg.rs, components/script_traits/script_msg.rs, components/script_traits/lib.rs, components/script_traits/lib.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jun 23, 2016
@asajeffrey
asajeffrey force-pushed the constellation-logging branch from 1673b5f to cdcc1e8 Compare June 23, 2016 17:32
@asajeffrey

Copy link
Copy Markdown
Contributor Author

Rebased.

@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #12178) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Jul 3, 2016
@asajeffrey

Copy link
Copy Markdown
Contributor Author

rust-lang/log#86 has landed, it just needs to make its way to crates.io.

@asajeffrey
asajeffrey force-pushed the constellation-logging branch from cdcc1e8 to ad862c0 Compare July 11, 2016 17:35
@asajeffrey

Copy link
Copy Markdown
Contributor Author

Rebased.

@asajeffrey asajeffrey removed the S-needs-rebase There are merge conflict errors. label Jul 11, 2016
@asajeffrey
asajeffrey force-pushed the constellation-logging branch from ad862c0 to 0ce4055 Compare July 11, 2016 18:32
@asajeffrey asajeffrey changed the title Sent log messages to the constellation [DO NOT MERGE YET] Send log messages to the constellation Jul 11, 2016
@asajeffrey

Copy link
Copy Markdown
Contributor Author

env_logger 0.3.4 is now out, so this can merge. r? @Ms2ger

asajeffrey pushed a commit to asajeffrey/servo that referenced this pull request Jul 14, 2016
…by integrated logging and issue reporting.
asajeffrey pushed a commit to asajeffrey/servo that referenced this pull request Jul 14, 2016
…by integrated logging and issue reporting.

/// A logger directed at the constellation from content processes
#[derive(Clone)]
pub struct FromScriptLogger {

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.

We could probably have a FromLogger<T> struct with a common Log impl, where T is FromFooMsg, and implements a trait which provides a get_msg(Option<PipelineId>, Option<String>, LogEntry) -> Self method

@Manishearth

Copy link
Copy Markdown
Member

r=me with or without that trait abstraction

@asajeffrey

Copy link
Copy Markdown
Contributor Author

I think since there's only two instances, the extra level of generality won't buy us that much. Thanks for looking the code over!

@bors-servo r=Manishearth

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit bc1dd50 has been approved by Manishearth

@highfive highfive assigned Manishearth and unassigned Ms2ger Jul 15, 2016
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 15, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit bc1dd50 with merge d97d297...

bors-servo pushed a commit that referenced this pull request Jul 15, 2016
Send log messages to the constellation

<!-- Please describe your changes on the following line: -->

Send all warnings and errors to the constellation. Warnings are bufferred up, and included in any subsequent error reports. Errors are reported in the same way as panics.

Note that this can't merge yet, as it needs rust-lang/log#86 to land.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11776 (github issue number if applicable).
- [X] These changes do not require tests because we don't test crash reporting.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11841)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 15, 2016
@highfive

Copy link
Copy Markdown
  ▶ Unexpected subtest result in /workers/WorkerGlobalScope_close.htm:
  └ PASS [expected FAIL]  WorkerGlobalScope close(): clear events queue 

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jul 15, 2016
@asajeffrey

Copy link
Copy Markdown
Contributor Author

OK, that's weird, did I accidentally fix a bug?

@asajeffrey

Copy link
Copy Markdown
Contributor Author

IRC conversation: http://logs.glob.uno/?c=mozilla%23servo&s=15+Jul+2016&e=15+Jul+2016#c480756

TL;DR: when logs are reported to the constellation, we can check to see if the thread has panicked, and report Errors as Panics. The issue reporting and hard-failing mechanism can then just be used for panic, in particular hard-fail won't be triggered by JS errors.

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jul 15, 2016
@asajeffrey asajeffrey added the S-needs-squash Some (or all) of the commits in the PR should be combined. label Jul 15, 2016
@asajeffrey

Copy link
Copy Markdown
Contributor Author

@Manishearth care to look over that last commit?

@asajeffrey
asajeffrey force-pushed the constellation-logging branch from eccd395 to 4442274 Compare July 15, 2016 18:44
@asajeffrey

asajeffrey commented Jul 15, 2016 •

Copy link
Copy Markdown
Contributor Author

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 4442274 has been approved by Manishearth

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-squash Some (or all) of the commits in the PR should be combined. labels Jul 15, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

💡 This pull request was already approved, no need to approve it again.

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 4442274 has been approved by Manishearth

@asajeffrey

Copy link
Copy Markdown
Contributor Author

@bors-servo retry

  • CI oddness

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 4442274 with merge a5cd4b9...

bors-servo pushed a commit that referenced this pull request Jul 15, 2016
Send log messages to the constellation

<!-- Please describe your changes on the following line: -->

Send all warnings and errors to the constellation. Warnings are bufferred up, and included in any subsequent error reports. Errors are reported in the same way as panics.

Note that this can't merge yet, as it needs rust-lang/log#86 to land.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11776 (github issue number if applicable).
- [X] These changes do not require tests because we don't test crash reporting.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11841)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

@bors-servo
bors-servo merged commit 4442274 into servo:master Jul 15, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 15, 2016
asajeffrey pushed a commit to asajeffrey/servo that referenced this pull request Jul 15, 2016
…by integrated logging and issue reporting.
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.

Include warnings in crash reports

7 participants