Skip to content

Commit e4667f7

Browse files
committed
fix project root bug
1 parent 265fd6d commit e4667f7

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tinydancer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tinydancer"
3-
version = "0.0.4"
3+
version = "0.0.5"
44
edition = "2021"
55
default-run = "tinydancer"
66
authors = ["Anoushk Kharangate <[email protected]>"]

tinydancer/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ async fn main() {
143143
rpc_endpoint: get_cluster(config_file.cluster),
144144
sample_qty,
145145
tui_monitor,
146+
log_path: config_file.log_path,
146147
archive_config: {
147148
if let Some(path) = archive_path {
148149
Some(ArchiveConfig {

tinydancer/src/tinydancer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ pub struct TinyDancerConfig {
4343
pub enable_ui_service: bool,
4444
pub archive_config: Option<ArchiveConfig>,
4545
pub tui_monitor: bool,
46+
pub log_path: String,
4647
}
4748

4849
use solana_metrics::datapoint_info;
@@ -74,18 +75,17 @@ pub fn get_project_root() -> io::Result<PathBuf> {
7475
}
7576
impl TinyDancer {
7677
pub async fn new(config: TinyDancerConfig) -> Self {
77-
let path = get_project_root().unwrap();
7878
let status = ClientStatus::Initializing(String::from("Starting Up Tinydancer"));
7979
let client_status = Arc::new(Mutex::new(status));
8080
let status_sampler = Arc::clone(&client_status);
81-
// datapoint_info!("log", ("test", "testvalue", String));
82-
info!("{:?}", path);
83-
tiny_logger::setup_file_with_default(path.to_str().unwrap(), "RUST_LOG");
81+
82+
tiny_logger::setup_file_with_default(&config.log_path, "RUST_LOG");
8483
let TinyDancerConfig {
8584
enable_ui_service,
8685
rpc_endpoint,
8786
sample_qty,
8887
tui_monitor,
88+
log_path,
8989
archive_config,
9090
} = config.clone();
9191
let rpc_cluster = rpc_endpoint.clone();

0 commit comments

Comments
 (0)