Skip to main content

rpfm_telemetry/
lib.rs

1//---------------------------------------------------------------------------//
2// Copyright (c) 2017-2026 Ismael Gutiérrez González. All rights reserved.
3//
4// This file is part of the Rusted PackFile Manager (RPFM) project,
5// which can be found here: https://github.com/Frodo45127/rpfm.
6//
7// This file is licensed under the MIT license, which can be found here:
8// https://github.com/Frodo45127/rpfm/blob/master/LICENSE.
9//---------------------------------------------------------------------------//
10
11//! Logging, crash reporting and anonymous action telemetry for RPFM.
12//!
13//! This crate bundles three related concerns that share the same Sentry
14//! lifecycle:
15//!
16//! - **Structured logging**: re-exports `log`'s `info!`/`warn!`/`error!`
17//!   macros so every crate can emit log lines without pulling Sentry.
18//! - **Crash reporting**: [`Logger::init`] installs panic hooks, writes
19//!   local crash reports and wires up Sentry for release builds.
20//! - **Action telemetry**: a lightweight action counter that aggregates
21//!   anonymous usage data and ships it to Sentry on graceful shutdown.
22//!
23//! Libraries (`rpfm_lib`, `rpfm_extensions`, `rpfm_ui_common`, ...) depend
24//! only on the plain `log` crate. The executables (`rpfm_ui`, `rpfm_server`)
25//! depend on this crate to wire up the full stack.
26
27pub use log::{debug, error, info, trace, warn};
28
29mod actions;
30mod feedback;
31mod logger;
32
33pub use actions::*;
34pub use feedback::*;
35pub use logger::*;