pub fn logs_path(data_dir: &Path, network: Network) -> PathBuf
Expand description
Cuprate’s logs directory.
This is the PATH used for all Cuprate log files.
use cuprate_helper::{network::Network, fs::{CUPRATE_DATA_DIR, logs_path}};
assert_eq!(logs_path(&**CUPRATE_DATA_DIR, Network::Mainnet).as_path(), CUPRATE_DATA_DIR.join("logs"));
assert_eq!(logs_path(&**CUPRATE_DATA_DIR, Network::Stagenet).as_path(), CUPRATE_DATA_DIR.join(Network::Stagenet.to_string()).join("logs"));
assert_eq!(logs_path(&**CUPRATE_DATA_DIR, Network::Testnet).as_path(), CUPRATE_DATA_DIR.join(Network::Testnet.to_string()).join("logs"));