Skip to content

Commit e364df3

Browse files
authored
docs: add logging and sharing flow documentation (#22554)
1 parent 12844e0 commit e364df3

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

doc/logging-and-sharing-flow.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Status App Logging and Sharing Flow
2+
3+
## Overview
4+
The Status app maintains four log files to track different aspects of its operation. This document outlines the purpose of each log file, their configuration, storage, and the process for sharing logs.
5+
6+
## Log Files
7+
8+
- **api.log**
9+
Records interactions between the frontend and the backend(status-go).
10+
11+
- **pre-login.log**
12+
Captures logs generated before user login.
13+
14+
- **Status.log**
15+
Stores logs output by the frontend.
16+
17+
- **Profile log**
18+
Dynamically named log file that records user-specific logs after successful login. The log file name is generated based on the user's keyUID which is truncated to 8 characters. Each user profile has its own log file.
19+
20+
## Log Level Configuration
21+
22+
### pre-login.log
23+
- **Setting Method:** Shake the phone before login to open a dialog box.
24+
- **Options:** Includes a log level setting option (e.g., DEBUG, INFO).
25+
- **Behavior:** The log level setting is only available pre-login. After login, shaking the phone does not display this option.
26+
- **Impact:** The configured log level is inherited by the Profile log for newly created users.
27+
28+
### Profile Log
29+
- **Setting Method:** Can be configured after user login through app advanced settings.
30+
- **Note:** Inherits the log level from pre-login.log for new users.
31+
32+
## Log File Storage
33+
- **Default Behavior:** All log files are stored in a protected folder named "logs" within the app to ensure privacy and security.
34+
- **Exception:** On Android e2e build, logs are stored in the publicly accessible Download folder.
35+
36+
## Log setting storage
37+
- pre-login setting is stored with [mmkv](https://github.com/mrousavy/react-native-mmkv), we have some pre-configured values for log level in files `.env.xxx` e.g `.env` / `.env.e2e` , corresponding field name is `LOG_LEVEL`
38+
- profile log setting is stored in db with status-go
39+
40+
## Log Sharing
41+
- **Method:**
42+
- Shake the phone to open a dialog box.
43+
- Select the "Share logs" option from the menu.
44+
- **Note:** Be careful when sharing logs with others, as it may leak sensitive information.
45+

0 commit comments

Comments
 (0)