mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-10-14 19:27:09 -04:00
Stores: the stores log lives under filesDir/logs/stores
Beside the session folders, where every log is headed, so the log share and the stores agree on one place.
This commit is contained in:
1 parent
e0b0af4290
commit
96d8678dd3
3 files changed
+5
-4
No files matched your search
@@ -9,7 +9,8 @@ import java.util.Locale
|
||||
import java.util.concurrent.Executors
|
||||
|
||||
/**
|
||||
* The stores' log on disk, app-private: `filesDir/stores/logs/stores-<yyyy-MM-dd>.log`, one file a
|
||||
* The stores' log on disk, app-private: `filesDir/logs/stores/stores-<yyyy-MM-dd>.log` (beside the
|
||||
* session folders, where every log lives), one file a
|
||||
* day, the last [KEEP_DAYS] kept, each capped near [MAX_BYTES] (the full one moves to `.1`). Lines
|
||||
* arrive already redacted ([StoreLog.redactLine]). Written on one background thread, in order. The
|
||||
* session's Share logs zip carries these files, so they can be attached to a report when asked.
|
||||
@@ -22,7 +23,7 @@ object StoreLogFiles {
|
||||
private val NAME = Regex("""stores-(\d{4}-\d{2}-\d{2})\.log(\.1)?""")
|
||||
private val writer = Executors.newSingleThreadExecutor { r -> Thread(r, "store-log").apply { isDaemon = true } }
|
||||
|
||||
fun dir(context: Context): File = File(context.applicationContext.filesDir, "stores/logs")
|
||||
fun dir(context: Context): File = File(context.applicationContext.filesDir, "logs/stores")
|
||||
|
||||
/** Appends one stamped line to today's file. Any thread. */
|
||||
fun append(context: Context, line: String) {
|
||||
|
||||
@@ -114,7 +114,7 @@ each manager runs its Java fetch loop.
|
||||
| Install to (last pick, dialog default only) | `SessionPrefs.storesInstallTarget` | the Install dialog |
|
||||
|
||||
Store log lines (the engines' included) go through `StoresState.logLine`, which redacts them
|
||||
(`StoreLog.redactLine`) and writes them to logcat and to `filesDir/stores/logs/stores-<date>.log`
|
||||
(`StoreLog.redactLine`) and writes them to logcat and to `filesDir/logs/stores/stores-<date>.log`
|
||||
(`StoreLogFiles`: one file a day, seven days kept, ~2 MB each before it rolls to `.1`). Nothing
|
||||
shows them in the app; the session's Share logs zip carries them under `stores/`.
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ without it and Setup says "Stores engine not built").
|
||||
A thin bar over the art while downloading. Install, Resume, Uninstall, Get and Buy live on the
|
||||
game page; A on a card opens it.
|
||||
- **No log panel:** the Downloads page's engine log is gone. Store lines go to logcat and to
|
||||
app-private daily files (`filesDir/stores/logs/stores-<date>.log`, seven days, ~2 MB rolling to
|
||||
app-private daily files (`filesDir/logs/stores/stores-<date>.log`, seven days, ~2 MB rolling to
|
||||
`.1`), pruned as the app starts; the session's Share logs zip includes them under `stores/`.
|
||||
- **Store log lines are redacted at the one choke point** (`StoresState.logLine`, which the engines'
|
||||
lines reach too): every URL is cut to scheme, host and a plain first path segment (a GOG secure
|
||||
|
||||
Reference in new issue
Block a user