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

Implemented configurable logging through C API #23813. #24184

Closed
wants to merge 1 commit into from
Closed

Implemented configurable logging through C API #23813. #24184

wants to merge 1 commit into from

Conversation

angelortiz1007
Copy link
Contributor

@angelortiz1007 angelortiz1007 commented Sep 11, 2019

In CInitOptions added the variable pub ptrfunc: Option<fn(*const c_char) -> bool> which is responsible for being assigned to an Option<> None, or to a function implemented in the C/C++ code. The C/C++ implemented function is a platform specific logger.

In addition, vslogger.rs::log() function was modified to call this C/C++ platform specific function - if implemented - and the Windows C/C++ OutputDebugString() function no longer called.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #_23813 (GitHub issue number if applicable)
  • There are tests for these changes OR
  • These changes do not require tests because ___

This change is Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 11, 2019
support/hololens/ServoApp/ServoControl/Servo.cpp Outdated Show resolved Hide resolved
ports/libsimpleservo/capi/src/vslogger.rs Outdated Show resolved Hide resolved
ports/libsimpleservo/capi/src/lib.rs Outdated Show resolved Hide resolved
ports/libsimpleservo/capi/src/lib.rs Outdated Show resolved Hide resolved
@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 11, 2019
@jdm jdm assigned jdm and unassigned avadacatavra Sep 11, 2019
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Sep 11, 2019
@jdm
Copy link
Member

jdm commented Sep 11, 2019

@bors-servo r+
Thanks!

@bors-servo
Copy link
Contributor

📌 Commit 98c98a7 has been approved by jdm

@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 Sep 11, 2019
@angelortiz1007
Copy link
Contributor Author

You are welcome!

Let me know if you want to have 1 last zoom briefing exit.

@jdm
Copy link
Member

jdm commented Sep 11, 2019

I won't be available for that, sadly.

@bors-servo
Copy link
Contributor

⌛ Testing commit 98c98a7 with merge 7bff531...

bors-servo pushed a commit that referenced this pull request Sep 12, 2019
Implemented configurable logging through C API #23813.

<!-- Please describe your changes on the following line: -->
In CInitOptions added the variable  pub ptrfunc: Option<fn(*const c_char) -> bool> which is responsible for being assigned to an Option<> None, or to a function implemented in the C/C++ code.  The C/C++ implemented function is a platform specific logger.

In addition, vslogger.rs::log() function was modified to call this C/C++ platform specific function - if implemented - and the Windows C/C++ OutputDebugString() function no longer called.

---
<!-- 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 #__23813_ (GitHub issue number if applicable)

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24184)
<!-- Reviewable:end -->
@jdm
Copy link
Member

jdm commented Sep 12, 2019

We'll need to clean this up for non-windows builds:

error[E0432]: unresolved import `crate::vslogger`
  --> ports/libsimpleservo/capi/src/lib.rs:11:12
   |
11 | use crate::vslogger::LOG_PTR_FUNC;
   |            ^^^^^^^^ maybe a missing crate `vslogger`?
error: aborting due to previous error

@bors-servo
Copy link
Contributor

💔 Test failed - status-taskcluster

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 12, 2019
@bors-servo
Copy link
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Oct 25, 2019
@jdm
Copy link
Member

jdm commented Apr 20, 2020

Superseded by #26196.

@jdm jdm closed this Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-needs-rebase There are merge conflict errors. S-tests-failed The changes caused existing tests to fail.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants