Files
lanspread/Cargo.toml
T
ddidderr 9d14e63613 fix: harden application log viewer
Add an Application Logs window backed by a bounded persistent main log file.
The viewer loads history from lanspread.log, subscribes to live INFO/WARN/ERROR
log events, supports filtering/copy/pause controls, and keeps the menu/window
routing separate from the unpack log viewer.

The backend sink now owns serialized access to the log file. History reads and
append-time trimming use the same sink lock, so opening the logs window cannot
race with a concurrent write and rewrite away a freshly appended line. The sink
also keeps a persistent file handle instead of reopening the file for each
captured event.

Live log events carry sink-local sequence ids. The frontend uses the history
watermark plus returned history line counts to suppress live events that were
already included in the history response, while preserving buffered rows that
were trimmed out of the history file. Auto-scroll now follows the last visible
row identity, so it continues following after the in-memory cap keeps the row
count stable.

No timestamp code change was needed. On the Linux dev host, a temporary probe
showed time::OffsetDateTime::now_local() returning +02:00 while UTC was +00:00,
matching the host CEST offset.

Test Plan:
- just fmt
- just frontend-test
- just test
- just clippy
- just build
- git diff --cached --check
- temporary Linux probe of OffsetDateTime::now_local() showed local +02:00

Refs: none
2026-06-07 18:59:05 +02:00

78 lines
1.7 KiB
TOML

[workspace]
resolver = "3"
members = [
"crates/lanspread-compat",
"crates/lanspread-db",
"crates/lanspread-mdns",
"crates/lanspread-peer",
"crates/lanspread-peer-cli",
"crates/lanspread-proto",
"crates/lanspread-tauri-deno-ts/src-tauri",
"crates/lanspread-utils",
]
[workspace.dependencies]
base64 = "0.22"
bytes = { version = "1", features = ["serde"] }
eyre = "0.6"
futures = "0.3"
gethostname = "1"
if-addrs = "0.15"
log = "0.4"
mdns-sd = "0.20"
mimalloc = { version = "0.1", features = ["secure"] }
notify = "8"
s2n-quic = { version = "1", features = ["provider-event-tracing"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sqlx = {
version = "0.9",
default-features = false,
features = [
"derive",
"runtime-tokio",
"sqlite",
]
}
strum = { version = "0.28", features = ["derive"] }
tauri = { version = "2", features = [] }
tauri-plugin-dialog = "2"
tauri-plugin-shell = "2"
tauri-plugin-store = "2"
time = { version = "0.3", features = ["local-offset"] }
tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7", features = ["codec", "rt"] }
tracing = "0.1"
tracing-log = "0.2"
tracing-subscriber = "0.3"
uuid = { version = "1", features = ["v7"] }
walkdir = "2"
windows = {
version = "0.62",
features = [
"Win32",
"Win32_UI",
"Win32_UI_Shell",
"Win32_UI_WindowsAndMessaging",
]
}
[profile.release]
debug = true
strip = false
debug-assertions = true
overflow-checks = true
lto = false
panic = "unwind"
incremental = true
[profile.production]
inherits = "release"
debug = false
strip = true
debug-assertions = false
overflow-checks = false
lto = true
incremental = false
codegen-units = 1