Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ReactorScram committed Apr 30, 2024
1 parent b231d7c commit 17ac1eb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rust/gui-client/src-tauri/src/client/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ pub(crate) struct Handles {

struct LogPath {
/// Where to find the logs on disk
///
/// e.g. `/var/log/dev.firezone.client`
src: PathBuf,
/// Where to store the logs in the zip
///
/// e.g. `connlib`
dst: PathBuf,
}

Expand Down Expand Up @@ -237,6 +241,13 @@ fn log_paths() -> Result<Vec<LogPath>> {
Ok(vec![app_log_path()?])
}

/// Log dir for just the GUI app
///
/// e.g. `$HOME/.cache/dev.firezone.client/data/logs`
/// or `%LOCALAPPDATA%/dev.firezone.client/data/logs`
///
/// On Windows this also happens to contain the connlib logs,
/// until #3712 merges
fn app_log_path() -> Result<LogPath> {
Ok(LogPath {
src: known_dirs::logs().context("Can't compute app log dir")?,
Expand Down

0 comments on commit 17ac1eb

Please sign in to comment.