The directory to all the logs
()
| 141 | |
| 142 | /// The directory to all the logs |
| 143 | pub fn logs_dir() -> Result<PathBuf> { |
| 144 | cfg_if::cfg_if! { |
| 145 | if #[cfg(unix)] { |
| 146 | Ok(runtime_dir()?.join("qlog")) |
| 147 | } else if #[cfg(windows)] { |
| 148 | Ok(std::env::temp_dir().join("amazon-q").join("logs")) |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | /// Canonicalizes path given by expanding the path given |
| 154 | pub fn canonicalizes_path(os: &Os, path_as_str: &str) -> Result<String> { |