forked from NationTech/harmony
		
	feat: add .gitignore and update file paths
Add a .gitignore file to exclude target, private_repos, and log directories. Update TftpScore and HttpScore file paths in `main.rs` to use relative paths from the project root. Modify `HarmonyTUI` initialization in `lib.rs` to create log directory if it doesn't exist before setting the log file path.
This commit is contained in:
		
							parent
							
								
									96bbef8195
								
							
						
					
					
						commit
						0eb9e02b99
					
				
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | target | ||||||
|  | private_repos | ||||||
|  | log/ | ||||||
| @ -81,9 +81,9 @@ async fn main() { | |||||||
|     let load_balancer_score = |     let load_balancer_score = | ||||||
|         harmony::modules::okd::load_balancer::OKDLoadBalancerScore::new(&topology); |         harmony::modules::okd::load_balancer::OKDLoadBalancerScore::new(&topology); | ||||||
| 
 | 
 | ||||||
|     let tftp_score = TftpScore::new(Url::LocalFolder("../../../watchguard/tftpboot".to_string())); |     let tftp_score = TftpScore::new(Url::LocalFolder("./data/watchguard/tftpboot".to_string())); | ||||||
|     let http_score = HttpScore::new(Url::LocalFolder( |     let http_score = HttpScore::new(Url::LocalFolder( | ||||||
|         "../../../watchguard/pxe-http-files".to_string(), |         "./data/watchguard/pxe-http-files".to_string(), | ||||||
|     )); |     )); | ||||||
|     let mut maestro = Maestro::new(inventory, topology); |     let mut maestro = Maestro::new(inventory, topology); | ||||||
|     maestro.register_all(vec![ |     maestro.register_all(vec![ | ||||||
|  | |||||||
| @ -110,7 +110,8 @@ impl HarmonyTUI { | |||||||
|         tui_logger::init_logger(log::LevelFilter::Info).unwrap(); |         tui_logger::init_logger(log::LevelFilter::Info).unwrap(); | ||||||
|         // Set default level for unknown targets to Trace
 |         // Set default level for unknown targets to Trace
 | ||||||
|         tui_logger::set_default_level(log::LevelFilter::Info); |         tui_logger::set_default_level(log::LevelFilter::Info); | ||||||
|         tui_logger::set_log_file("harmony.log").unwrap(); |         std::fs::create_dir_all("log")?; | ||||||
|  |         tui_logger::set_log_file("log/harmony.log").unwrap(); | ||||||
| 
 | 
 | ||||||
|         color_eyre::install()?; |         color_eyre::install()?; | ||||||
|         let mut terminal = ratatui::init(); |         let mut terminal = ratatui::init(); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user