Skip to content

Commit

Permalink
Better Version Logging (#206)
Browse files Browse the repository at this point in the history
* Added path to `spacetime version`, added version and path to `spacetime
start`

* Removed comment

---------

Co-authored-by: Boppy <no-reply@boppygames.gg>
  • Loading branch information
jdetter and Boppy authored Aug 21, 2023
1 parent aa9a845 commit 8eb1743
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/cli/src/subcommands/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub async fn exec(_config: Config, args: &ArgMatches) -> Result<(), anyhow::Erro
return Ok(());
}

println!("Path: {}", std::env::current_exe()?.display());
println!(
"spacetimedb tool version {}; spacetimedb-lib version {};",
CLI_VERSION,
Expand Down
4 changes: 4 additions & 0 deletions crates/standalone/src/subcommands/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ pub async fn exec(args: &ArgMatches) -> anyhow::Result<()> {
};

banner();
let exe_name = std::env::current_exe()?;
let exe_name = exe_name.file_name().unwrap().to_str().unwrap();
println!("{} version: {}", exe_name, env!("CARGO_PKG_VERSION"));
println!("{} path: {}", exe_name, std::env::current_exe()?.display());

if let Some(log_conf_path) = log_conf_path {
create_file_with_contents(log_conf_path, include_str!("../../log.conf"))?;
Expand Down

0 comments on commit 8eb1743

Please sign in to comment.