diff --git a/Cargo.lock b/Cargo.lock index 83ece36..164b117 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1830,7 +1830,7 @@ dependencies = [ [[package]] name = "mcl-launcher" -version = "0.1.0" +version = "0.2.0" dependencies = [ "async-trait", "chrono", diff --git a/README.md b/README.md index eb21572..a0e5f93 100644 --- a/README.md +++ b/README.md @@ -85,16 +85,27 @@ mcl can be compiled for Linux, macOS, and Windows. right now it's only packaged ## where things live -| path | what | -|---|---| -| `~/.config/mcl/config.toml` | general config (paths, memory defaults, UI settings) | -| `~/.config/mcl/theme.toml` | theme, border style, color overrides | -| `~/.config/mcl/accounts.json` | accounts | -| `~/.local/share/mcl/instances/` | instances, each in its own directory | -| `~/.local/share/mcl/meta/` | cached game metadata, libraries, assets, loader profiles | +### config & data + +settings, accounts, instances, and cached game metadata. + +| what | Linux | macOS | Windows | +|---|---|---|---| +| config (`config.toml`, `theme.toml`, `accounts.json`) | `~/.config/mcl/` | `~/Library/Application Support/mcl/` | `%APPDATA%\mcl\` | +| instances | `~/.local/share/mcl/instances/` | `~/Library/Application Support/mcl/instances/` | `%LOCALAPPDATA%\mcl\instances\` | +| metadata (versions, libraries, assets, loader profiles) | `~/.local/share/mcl/meta/` | `~/Library/Application Support/mcl/meta/` | `%LOCALAPPDATA%\mcl\meta\` | each instance has an `instance.json` for its config and a `.minecraft/` directory with the actual game files. standard layout, nothing weird. +### logs + +launcher logs are per-session and contain mcl's own output. instance launch logs capture game stdout/stderr per launch. + +| what | Linux | macOS | Windows | +|---|---|---|---| +| launcher logs | `~/.cache/mcl/` | `~/Library/Caches/mcl/` | `%LOCALAPPDATA%\mcl\` | +| instance launch logs | `//.minecraft/logs/launches/` | same | same | + --- ## configuration diff --git a/src/tui/logging.rs b/src/tui/logging.rs index 4aa4b18..040602a 100644 --- a/src/tui/logging.rs +++ b/src/tui/logging.rs @@ -54,12 +54,14 @@ pub fn init() -> WorkerGuard { } } - let file_appender = tracing_appender::rolling::daily(&log_dir, "mcl.log"); + let now = chrono::Local::now().format("%Y-%m-%d_%H-%M-%S"); + let file_appender = tracing_appender::rolling::never(&log_dir, format!("mcl_{now}.log")); let (non_blocking, guard) = tracing_appender::non_blocking(file_appender); let env_filter = EnvFilter::builder() .with_default_directive(Level::INFO.into()) - .from_env_lossy(); + .from_env_lossy() + .add_directive("mc_instance=off".parse().unwrap()); let rust_log = std::env::var("RUST_LOG").unwrap_or_default().to_lowercase(); let tui_level = if rust_log.contains("debug") || rust_log.contains("trace") {