Skip to content

Expose shared Servo thread logs to skit host logging #665

Description

Summary

The native Servo plugin's shared Servo thread emits diagnostics with tracing, but the plugin dylib has no tracing subscriber. As a result, all shared-thread diagnostics are silently dropped before reaching skit, including the CSS-stage log introduced while addressing #661.

This is especially harmful for production diagnosis because the dropped error-level messages include instance poisoning and Servo/render panic failures.

Current scope

plugins/native/servo/src/servo_thread.rs has 18 tracing calls:

  • 8 tracing::error!
  • 7 tracing::info!
  • 2 tracing::debug!
  • 1 tracing::warn!

All 18 are currently invisible in skit logs.

Proposed fix

Thread the host logger through shared-thread registration:

  1. Clone the SDK Logger into ServoWorkItem::Register.
  2. Store the logger in each shared-thread InstanceState.
  3. Replace the shared-thread diagnostics with the SDK plugin_* macros so messages use the host callback and appear in skit.

The error-level poison/panic diagnostics are the highest-priority messages to preserve.

Context

The CSS-stage logging issue was discovered while working on web-capture PR #661. The line was intentionally left consistent with the existing file convention rather than partially converting only one call site.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions