cli: Add logging and file limit setting

This commit is contained in:
cloudhead 2024-01-17 17:36:51 +01:00
parent 44fc11dff8
commit f4f479d68f
No known key found for this signature in database
1 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,12 @@ enum Command {
}
fn main() {
if let Some(lvl) = radicle::logger::env_level() {
radicle::logger::init(lvl).ok();
}
if let Err(e) = radicle::io::set_file_limit(4096) {
log::warn!(target: "cli", "Unable to set open file limit: {e}");
}
match parse_args().map_err(Some).and_then(run) {
Ok(_) => process::exit(0),
Err(err) => {