Sync desktop daily logs and fix emulator ADB upstream connections
This commit is contained in:
1 parent
87e1fff59b
commit
0d269f3ded
15 files changed
+139
-12
No files matched your search
@@ -133,3 +133,5 @@ USB ADB 连续 3 轮监控缺失(约 9 秒)、USB 后端退出或 scrcpy 以
|
||||
运行日志保存到 `%LOCALAPPDATA%/TTSTD/ADS-Flutter/logs/ads-YYYY-MM-DD.log`。单文件达到约 5 MiB 后滚动,每天最多 5 份(含当天主文件),保留 14 天;应用关闭前等待写入完成。已加载令牌在内存和磁盘日志中均脱敏,单条磁盘日志最多 16384 字符。包括客户端/USB/scrcpy 子进程日志、Agent 管理操作错误,以及主动读取/跟随的 Agent 日志。日志页显示实际路径和写入错误。文件中可能包含设备地址、路径等诊断信息,分享前按需检查。
|
||||
|
||||
工作台和 Agent 页的刷新指示器使用固定高度占位。Agent 发现列表保留到切换主机;旧后端不支持 devices_discover 时提示同步更新 CLI 和 Agent。`test/daily_log_test.dart` 验证跨天、大小滚动、保留及脱敏,`test/cupertino_layout_test.dart` 验证电脑名和刷新布局不移位。
|
||||
|
||||
桌面日志界面提供“打开日志文件夹”。Avalonia 与 Flutter 均按天保存日志,单文件达到 5 MiB 后滚动,每日最多 5 份,保留最近 14 天。设备列表显示所属电脑及 Agent。Windows 安装包默认安装到 `%LOCALAPPDATA%/Programs/TongTongStudio/ADS-{Edition}`;用户配置和日志位置保持兼容。升级保持原 AppId,安装目录不再自动沿用旧的 TTSTD 路径。
|
||||
@@ -35,6 +35,17 @@ class ManagerModel extends ChangeNotifier {
|
||||
List<Map<String, dynamic>> nodes = [];
|
||||
final List<String> logs = [];
|
||||
late final DailyLog diskLog;
|
||||
Future<void> openLogDirectory() => action(() async {
|
||||
await diskLog.directory.create(recursive: true);
|
||||
final command = Platform.isWindows
|
||||
? 'explorer.exe'
|
||||
: Platform.isMacOS
|
||||
? 'open'
|
||||
: 'xdg-open';
|
||||
await Process.start(command, [
|
||||
logDirectory,
|
||||
], mode: ProcessStartMode.detached);
|
||||
});
|
||||
String get logDirectory => diskLog.directory.path;
|
||||
final Set<String> pending = {};
|
||||
String notice = '正在初始化', adbListing = '';
|
||||
|
||||
@@ -562,6 +562,10 @@ class _ManagerViewState extends State<ManagerView> {
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
TextButton(
|
||||
onPressed: m.openLogDirectory,
|
||||
child: const Text('打开日志文件夹'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () =>
|
||||
Clipboard.setData(ClipboardData(text: m.logs.join('\n'))),
|
||||
|
||||
Reference in new issue
Block a user