From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Subject: [PATCH 1/2] tools/xdg-desktop-portal-spectrum-host: set up log
Date: Thu, 26 Feb 2026 16:07:31 +0100 [thread overview]
Message-ID: <20260226150732.150645-1-hi@alyssa.is> (raw)
This will let us see logs from zbus.
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
.../Cargo.lock | 76 +++++++++++++++++++
.../Cargo.toml | 8 +-
.../src/main.rs | 5 ++
3 files changed, 88 insertions(+), 1 deletion(-)
diff --git a/tools/xdg-desktop-portal-spectrum-host/Cargo.lock b/tools/xdg-desktop-portal-spectrum-host/Cargo.lock
index 75b5607..cb32e66 100644
--- a/tools/xdg-desktop-portal-spectrum-host/Cargo.lock
+++ b/tools/xdg-desktop-portal-spectrum-host/Cargo.lock
@@ -2,6 +2,15 @@
# It is not intended for manual editing.
version = 4
+[[package]]
+name = "aho-corasick"
+version = "1.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
+dependencies = [
+ "memchr",
+]
+
[[package]]
name = "async-broadcast"
version = "0.7.2"
@@ -475,6 +484,12 @@ dependencies = [
"thiserror",
]
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
[[package]]
name = "libc"
version = "0.2.178"
@@ -493,6 +508,15 @@ version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
+[[package]]
+name = "matchers"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"
+dependencies = [
+ "regex-automata",
+]
+
[[package]]
name = "memchr"
version = "2.7.6"
@@ -622,6 +646,23 @@ version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
+[[package]]
+name = "regex-automata"
+version = "0.4.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
+
[[package]]
name = "rustix"
version = "1.1.2"
@@ -682,6 +723,15 @@ dependencies = [
"syn",
]
+[[package]]
+name = "sharded-slab"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
+dependencies = [
+ "lazy_static",
+]
+
[[package]]
name = "signal-hook-registry"
version = "1.4.7"
@@ -770,6 +820,15 @@ dependencies = [
"syn",
]
+[[package]]
+name = "thread_local"
+version = "1.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
+dependencies = [
+ "cfg-if",
+]
+
[[package]]
name = "tinystr"
version = "0.8.2"
@@ -841,6 +900,21 @@ dependencies = [
"once_cell",
]
+[[package]]
+name = "tracing-subscriber"
+version = "0.3.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
+dependencies = [
+ "matchers",
+ "once_cell",
+ "regex-automata",
+ "sharded-slab",
+ "thread_local",
+ "tracing",
+ "tracing-core",
+]
+
[[package]]
name = "uds_windows"
version = "1.1.0"
@@ -1009,6 +1083,8 @@ dependencies = [
"landlock",
"percent-encoding",
"rustix",
+ "tracing",
+ "tracing-subscriber",
"url",
"zbus",
]
diff --git a/tools/xdg-desktop-portal-spectrum-host/Cargo.toml b/tools/xdg-desktop-portal-spectrum-host/Cargo.toml
index 23cadf0..5dc0d99 100644
--- a/tools/xdg-desktop-portal-spectrum-host/Cargo.toml
+++ b/tools/xdg-desktop-portal-spectrum-host/Cargo.toml
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: CC0-1.0
-# SPDX-FileCopyrightText: 2024 Alyssa Ross <hi@alyssa.is>
+# SPDX-FileCopyrightText: 2024-2025 Alyssa Ross <hi@alyssa.is>
[package]
name = "xdg-desktop-portal-spectrum-host"
@@ -13,5 +13,11 @@ futures-lite = "2.3.0"
landlock = "0.4.4"
percent-encoding = "2.3.1"
rustix = "1.0"
+tracing = "0.1.43"
url = "2.5.0"
zbus = "5.1.1"
+
+[dependencies.tracing-subscriber]
+version = "0.3.22"
+default-features = false
+features = ["env-filter", "fmt"]
diff --git a/tools/xdg-desktop-portal-spectrum-host/src/main.rs b/tools/xdg-desktop-portal-spectrum-host/src/main.rs
index a867219..40b14b4 100644
--- a/tools/xdg-desktop-portal-spectrum-host/src/main.rs
+++ b/tools/xdg-desktop-portal-spectrum-host/src/main.rs
@@ -23,6 +23,7 @@ use landlock::{
ABI, Access, AccessFs, AccessNet, CompatLevel, Compatible, Ruleset, RulesetAttr, RulesetError,
Scope,
};
+use tracing_subscriber::EnvFilter;
use zbus::{AuthMechanism, Connection, MessageStream, connection};
use file_chooser::FileChooser;
@@ -236,6 +237,10 @@ fn read_argv() {
fn run() -> Result<(), String> {
set_up_landlock().map_err(|e| format!("setting up landlock: {e}"))?;
+ tracing_subscriber::fmt()
+ .with_env_filter(EnvFilter::from_default_env())
+ .init();
+
read_argv();
async_io::block_on(EXECUTOR.run(async {
base-commit: 1a0d063dccf3465ffffda8312994d6066bc1a602
--
2.52.0
next reply other threads:[~2026-02-26 15:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 15:07 Alyssa Ross [this message]
2026-02-26 15:07 ` [PATCH 2/2] tools/xdg-desktop-portal-spectrum-host: use tracing Alyssa Ross
2026-02-26 18:54 ` Demi Marie Obenour
2026-02-27 11:08 ` Alyssa Ross
2026-02-27 11:08 ` [PATCH 1/2] tools/xdg-desktop-portal-spectrum-host: set up log Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260226150732.150645-1-hi@alyssa.is \
--to=hi@alyssa.is \
--cc=devel@spectrum-os.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).