Log version info on app startup

This commit is contained in:
Dain Nilsson 2024-08-14 13:40:14 +02:00
parent 72a1dc511f
commit ba2e979de3
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8

View File

@ -15,6 +15,7 @@
*/
import 'dart:developer' as developer;
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
@ -27,6 +28,7 @@ import 'app/state.dart';
import 'core/state.dart';
import 'desktop/init.dart' as desktop;
import 'error_page.dart';
import 'version.dart';
final _log = Logger('main');
@ -43,6 +45,12 @@ void main(List<String> argv) async {
_initializeDebugLogging();
throw UnimplementedError('Platform not supported');
}
_log.info('Running Yubico Authenticator...', {
'app_version': version,
'dart': Platform.version,
'os': Platform.operatingSystem,
'os_version': Platform.operatingSystemVersion,
});
runApp(initializedApp);
} catch (e) {
_log.warning('Platform initialization failed: $e');