mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-29 06:20:28 +08:00
patch: Initialize w/ unified command
This commit is contained in:
@@ -10,6 +10,7 @@ use tuirealm::{Application, EventListenerCfg, NoUserEvent};
|
||||
|
||||
pub mod cob;
|
||||
pub mod context;
|
||||
pub mod log;
|
||||
pub mod ui;
|
||||
|
||||
use context::Context;
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
use log::LevelFilter;
|
||||
|
||||
use radicle::profile::Profile;
|
||||
|
||||
pub fn enable(cmd: &str, op: &str, profile: &Profile) -> Result<(), anyhow::Error> {
|
||||
let logfile = format!(
|
||||
"{}/rad-tui-{}-{}.log",
|
||||
profile.home().path().to_string_lossy(),
|
||||
cmd,
|
||||
op,
|
||||
);
|
||||
simple_logging::log_to_file(logfile, LevelFilter::Info)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user