mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-09 20:49:29 +00:00
feat: error reporting with logs (#45)
* feat: add ability to get logs file from ui * test: add unit test for log line parsing in logs_provider * refactor: update all logs to obfuscate sensitive information * feat: generate dynamic zip file name for logs export * feat: enhance logging in audiobook player and provider for better debugging * refactor: extract user display logic into UserBar widget for offline access of settings and logs * feat: add About section with app metadata and source code link in YouPage
This commit is contained in:
parent
7b0c2c4b88
commit
35a2d7cfce
44 changed files with 861 additions and 176 deletions
|
|
@ -4,6 +4,7 @@ import 'package:logging/logging.dart';
|
|||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:vaani/db/available_boxes.dart';
|
||||
import 'package:vaani/settings/models/api_settings.dart' as model;
|
||||
import 'package:vaani/shared/extensions/obfuscation.dart';
|
||||
|
||||
part 'api_settings_provider.g.dart';
|
||||
|
||||
|
|
@ -19,6 +20,7 @@ class ApiSettings extends _$ApiSettings {
|
|||
ref.listenSelf((_, __) {
|
||||
writeToBox();
|
||||
});
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
|
|
@ -33,7 +35,7 @@ class ApiSettings extends _$ApiSettings {
|
|||
activeServer: foundSettings.activeUser?.server,
|
||||
);
|
||||
}
|
||||
_logger.fine('found api settings in box: $foundSettings');
|
||||
_logger.fine('found api settings in box: ${foundSettings.obfuscate()}');
|
||||
return foundSettings;
|
||||
} else {
|
||||
// create a new settings object
|
||||
|
|
@ -47,7 +49,7 @@ class ApiSettings extends _$ApiSettings {
|
|||
void writeToBox() {
|
||||
_box.clear();
|
||||
_box.add(state);
|
||||
_logger.fine('wrote api settings to box: $state');
|
||||
_logger.fine('wrote api settings to box: ${state.obfuscate()}');
|
||||
}
|
||||
|
||||
void updateState(model.ApiSettings newSettings, {bool force = false}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue