Skip to content

Allow specifying guest trace level for different modules #1269

Open

Description

@dblnz

We currently have a single trace level for everything inside the guest (all the modules).
We currently have no way to specify a trace level for the guest but a different one for the host (for the same module).
I'll make a separate issue to tackle this.

This is possible to imply a change of API for the entrypoint.

Moreover, we should think of a way to do this per guest call, because going forward, taking a snapshot after creation means the trace level cannot be changed afterwards.

Activity

  1. added this to the Tracking milestone on Mar 3, 2026
  2. simongdavies commented on Mar 11, 2026

    @simongdavies
    Member

    Linked to #1268

  3. added
    questionFurther information is requested
    lifecycle/confirmedBug is verified or proposal seems reasonable
    and removed on Mar 11, 2026
  4. modified the milestones: Tracking, Backlog on Mar 11, 2026
  5. removed this from the Backlog milestone on Jun 17, 2026
  6. ludfjig commented on Oct 22, 2026

    @ludfjig
    Contributor

    #1833 covers most of this:

    • The guest level is set separately from the host with SandboxBuilder::guest_log_level and Sandbox::log_level. It no longer depends on RUST_LOG.
    • The level can change after a snapshot. Sandbox::log_level applies to future guest calls, and restore() reapplies it. Calling it before a call gives per-call control. The entrypoint API did not change.

    Not covered: per-module guest levels. The guest gets one level for all modules. Supporting directives like my_guest::net=trace,warn means sending a variable-length filter to the guest, which today receives a single u64 in scratch memory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/confirmedBug is verified or proposal seems reasonablequestionFurther information is requested

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions