Skip to content

Commit

Permalink
use log instead of eprintln
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Sep 14, 2024
1 parent 92ad508 commit fba9d54
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions core/tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ nix = { version = "0.26.0", default-features = false, features = [ "user", "sock
[target."cfg(target_os = \"macos\")".dependencies]
embed_plist = "1.2"
plist = "1"
log = "0.4"
cocoa = "0.24" # wry still uses 0.24
objc = "0.2" # Do not update without consensus

Expand Down
4 changes: 2 additions & 2 deletions core/tauri/src/api/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub fn restart(env: &Env) {
restart_macos_app(&path, env);

if let Err(e) = Command::new(path).args(&env.args).spawn() {
eprintln!("failed to restart app: {e}");
log::error!("failed to restart app: {e}");

Check failure on line 91 in core/tauri/src/api/process.rs

View workflow job for this annotation

GitHub Actions / all

failed to resolve: use of undeclared crate or module `log`

error[E0433]: failed to resolve: use of undeclared crate or module `log` --> core/tauri/src/api/process.rs:91:7 | 91 | log::error!("failed to restart app: {e}"); | ^^^ use of undeclared crate or module `log`
}
}

Expand Down Expand Up @@ -126,7 +126,7 @@ fn restart_macos_app(current_binary: &PathBuf, env: &Env) {
.args(&env.args)
.spawn()
{
eprintln!("failed to restart app: {e}");
log::error!("failed to restart app: {e}");
}

exit(0);
Expand Down
1 change: 1 addition & 0 deletions examples/api/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fba9d54

Please sign in to comment.