fix(gui-client): initialise logger one layer up (#9111)

Initialising the logger as part of the `open` function causes a flaky
test in case there is already another logger initialised.

Fixes: #9096
This commit is contained in:
Thomas Eizinger
2025-05-13 13:55:59 +10:00
committed by GitHub
parent b93c28240e
commit b0e20d8a41
2 changed files with 2 additions and 1 deletions

View File

@@ -70,6 +70,8 @@ fn main() -> anyhow::Result<()> {
// If we already tried to elevate ourselves, don't try again
Some(Cmd::Elevated) => run_gui(config),
Some(Cmd::OpenDeepLink(deep_link)) => {
firezone_gui_client::logging::setup_stdout()?;
let rt = tokio::runtime::Runtime::new()?;
if let Err(error) = rt.block_on(deep_link::open(&deep_link.url)) {
tracing::error!("Error in `OpenDeepLink`: {error:#}");

View File

@@ -86,7 +86,6 @@ impl Server {
pub async fn open(url: &url::Url) -> Result<()> {
crate::logging::setup_stdout()?;
let path = sock_path()?;
let mut stream = UnixStream::connect(&path).await?;