Clean up logging somewhat

This commit is contained in:
James 2018-08-03 20:59:43 +10:00
parent 066111951f
commit 1f6d1e8d52
2 changed files with 5 additions and 7 deletions

View File

@ -43,23 +43,23 @@ fn main() {
let app_name = config.general.name.clone(); let app_name = config.general.name.clone();
println!("{} installer", app_name);
let current_exe = std::env::current_exe().unwrap(); let current_exe = std::env::current_exe().unwrap();
let current_path = current_exe.parent().unwrap(); let current_path = current_exe.parent().unwrap();
let metadata_file = current_path.join("metadata.json"); let metadata_file = current_path.join("metadata.json");
println!("Attempting to open: {:?}", metadata_file);
let framework = if metadata_file.exists() { let framework = if metadata_file.exists() {
println!("Using pre-existing metadata file: {:?}", metadata_file);
InstallerFramework::new_with_db(config, current_path).unwrap() InstallerFramework::new_with_db(config, current_path).unwrap()
} else { } else {
println!("Starting fresh install");
InstallerFramework::new(config) InstallerFramework::new(config)
}; };
// blah 1
let server = WebServer::new(framework).unwrap(); let server = WebServer::new(framework).unwrap();
// Startup HTTP server for handling the web view // Startup HTTP server for handling the web view
let http_address = format!("http://{}", server.get_addr()); let http_address = format!("http://{}", server.get_addr());
println!("{}", http_address);
// Init the web view // Init the web view
let size = (1024, 550); let size = (1024, 550);

View File

@ -57,8 +57,6 @@ impl Task for ResolvePackageTask {
Err(v) => return Err(format!("An error occured while compiling regex: {:?}", v)), Err(v) => return Err(format!("An error occured while compiling regex: {:?}", v)),
}; };
println!("Releases: {:?}", results);
// Find the latest release in here // Find the latest release in here
let latest_result = results let latest_result = results
.into_iter() .into_iter()
@ -80,7 +78,7 @@ impl Task for ResolvePackageTask {
.next() .next()
.unwrap(); .unwrap();
println!("{:?}", latest_file); println!("Selected file: {:?}", latest_file);
Ok(TaskParamType::File(latest_version, latest_file)) Ok(TaskParamType::File(latest_version, latest_file))
} }