fix: log cosmic-settings-daemon output
This commit is contained in:
parent
b3900bc33e
commit
c3a35f323b
1 changed files with 24 additions and 4 deletions
28
src/main.rs
28
src/main.rs
|
|
@ -78,9 +78,10 @@ async fn main() -> Result<()> {
|
|||
let session_tx_clone = session_tx.clone();
|
||||
let _conn = ConnectionBuilder::session()?
|
||||
.name("com.system76.CosmicSession")?
|
||||
.serve_at("/com/system76/CosmicSession", service::SessionService {
|
||||
session_tx,
|
||||
})?
|
||||
.serve_at(
|
||||
"/com/system76/CosmicSession",
|
||||
service::SessionService { session_tx },
|
||||
)?
|
||||
.build()
|
||||
.await?;
|
||||
|
||||
|
|
@ -149,8 +150,27 @@ async fn start(
|
|||
env_vars.push(("XDG_SESSION_TYPE".to_string(), "wayland".to_string()));
|
||||
systemd::set_systemd_environment("XDG_SESSION_TYPE", "wayland").await;
|
||||
|
||||
let stdout_span = info_span!(parent: None, "cosmic-settings-daemon");
|
||||
let stderr_span = stdout_span.clone();
|
||||
process_manager
|
||||
.start(Process::new().with_executable("cosmic-settings-daemon"))
|
||||
.start(
|
||||
Process::new()
|
||||
.with_executable("cosmic-settings-daemon")
|
||||
.with_on_stdout(move |_, _, line| {
|
||||
let stdout_span = stdout_span.clone();
|
||||
async move {
|
||||
info!("{}", line);
|
||||
}
|
||||
.instrument(stdout_span)
|
||||
})
|
||||
.with_on_stderr(move |_, _, line| {
|
||||
let stderr_span = stderr_span.clone();
|
||||
async move {
|
||||
warn!("{}", line);
|
||||
}
|
||||
.instrument(stderr_span)
|
||||
}),
|
||||
)
|
||||
.await
|
||||
.expect("failed to start settings daemon");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue