Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@cbracken
Copy link
Member

@cbracken cbracken commented Apr 3, 2021

Previously messages logged from Dart code (e.g. via the print function)
were handled directly in the engine by platform-specific code. This
factors out a LogMessage(tag, message) callback that embedders can
implement with platform-specific code.

This also eliminates a dependency on platform-specific code in the core,
and provides more flexibility to embedders than the current fallback to
stdout, which can be a problem on platforms without a traditional stdout
or with restrictions on stdout.

Fixes flutter/flutter#79685

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.
  • The reviewer has submitted any presubmit flakes in this PR using the engine presubmit flakes form before re-triggering the failure.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@cbracken cbracken added tech-debt Technical debt, code quality, testing, etc. embedder Related to the embedder API platform-fuchsia labels Apr 3, 2021
Previously messages logged from Dart code (e.g. via the print function)
were handled directly in the engine by platform-specific code. This
factors out a LogMessage(tag, message) callback that embedders can
implement with platform-specific code.

This also eliminates a dependency on platform-specific code in the core,
and provides more flexibility to embedders than the current fallback to
stdout, which can be a problem on platforms without a traditional stdout
or with restrictions on stdout.

Fixes flutter/flutter#79685
@cbracken cbracken merged commit 23ac479 into flutter:master Apr 5, 2021
@cbracken cbracken deleted the logging_callback branch April 5, 2021 22:44
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2021
flar pushed a commit to flutter/flutter that referenced this pull request Apr 6, 2021
* 1d8d2df Rename EngineEmbedderApiModifier to EngineModifier (flutter/engine#25362)

* 057ed22 Roll Skia from b14a819122ee to 0a12b85f160f (5 revisions) (flutter/engine#25430)

* 079857d Roll Fuchsia Linux SDK from b22xnKMfp... to txu1APnex... (flutter/engine#25431)

* 23ac479 Extract Dart logging to the embedders (flutter/engine#25402)

* 5444e2b Remove the DartIsolate::PostMessage timeline event (flutter/engine#25433)

* 253a298 Roll Skia from 0a12b85f160f to 974c82150204 (1 revision) (flutter/engine#25434)

* 61dca0f Roll Dart SDK from c274ba72ec73 to 3dd1630ab4d4 (1 revision) (flutter/engine#25432)

* f09b189 Allow embedders to set a custom log tag (flutter/engine#25435)

* e74b649 Roll Fuchsia Mac SDK from F4eUNa2mh... to IKx9cvrtJ... (flutter/engine#25436)
duanqz pushed a commit to duanqz/engine that referenced this pull request Apr 16, 2021
Previously messages logged from Dart code (e.g. via the print function)
were handled directly in the engine by platform-specific code. This
factors out a LogMessage(tag, message) callback that embedders can
implement with platform-specific code.

This also eliminates a dependency on platform-specific code in the core,
and provides more flexibility to embedders than the current fallback to
stdout, which can be a problem on platforms without a traditional stdout
or with restrictions on stdout.

Fixes flutter/flutter#79685
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

affects: engine cla: yes embedder Related to the embedder API platform-android platform-fuchsia platform-ios tech-debt Technical debt, code quality, testing, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support embedder-specified log function for app output

3 participants