feat: Implement logger
This commit is contained in:
parent
e09f2071dc
commit
e7de6d9e25
13 changed files with 80 additions and 131 deletions
|
|
@ -15,6 +15,7 @@ import 'package:flushbar/flushbar.dart';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:logger_flutter/logger_flutter.dart';
|
||||
import 'package:universal_html/prefer_universal/html.dart' as html;
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
|
@ -166,7 +167,7 @@ class MatrixState extends State<Matrix> {
|
|||
),
|
||||
);
|
||||
default:
|
||||
debugPrint('Warning! Cannot handle the stage "$stage"');
|
||||
Logs().w('Warning! Cannot handle the stage "$stage"');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -301,13 +302,13 @@ class MatrixState extends State<Matrix> {
|
|||
}
|
||||
final configJson = json.decode(configJsonString);
|
||||
AppConfig.loadFromJson(configJson);
|
||||
} catch (error) {
|
||||
debugPrint(
|
||||
'[ConfigLoader] Failed to load config.json: ' + error.toString());
|
||||
} catch (e, s) {
|
||||
Logs().w('[ConfigLoader] Failed to load config.json', e, s);
|
||||
}
|
||||
}
|
||||
|
||||
void initMatrix() {
|
||||
LogConsole.init();
|
||||
clientName =
|
||||
'${AppConfig.applicationName} ${kIsWeb ? 'Web' : Platform.operatingSystem}';
|
||||
final Set verificationMethods = <KeyVerificationMethod>{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue