diff --git a/frontend/appflowy_flutter/packages/appflowy_backend/lib/appflowy_backend.dart b/frontend/appflowy_flutter/packages/appflowy_backend/lib/appflowy_backend.dart index 9c1a1de27c799..69e287f117be9 100644 --- a/frontend/appflowy_flutter/packages/appflowy_backend/lib/appflowy_backend.dart +++ b/frontend/appflowy_flutter/packages/appflowy_backend/lib/appflowy_backend.dart @@ -1,16 +1,19 @@ -export 'package:async/async.dart'; import 'dart:async'; import 'dart:convert'; +import 'dart:ffi'; +import 'dart:io'; +import 'dart:isolate'; + import 'package:appflowy_backend/rust_stream.dart'; +import 'package:ffi/ffi.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; -import 'dart:ffi'; -import 'ffi.dart' as ffi; -import 'package:ffi/ffi.dart'; -import 'dart:isolate'; -import 'dart:io'; import 'package:logger/logger.dart'; +import 'ffi.dart' as ffi; + +export 'package:async/async.dart'; + enum ExceptionType { AppearanceSettingsIsEmpty, } @@ -72,7 +75,8 @@ class RustLogStreamReceiver { lineLength: 120, // width of the output colors: false, // Colorful log messages printEmojis: false, // Print an emoji for each log message - printTime: false, // Should each log print contain a timestamp + dateTimeFormat: + DateTimeFormat.none, // Should each log print contain a timestamp ), level: kDebugMode ? Level.trace : Level.info, ); diff --git a/frontend/appflowy_flutter/packages/appflowy_backend/lib/log.dart b/frontend/appflowy_flutter/packages/appflowy_backend/lib/log.dart index dc79e655d179f..4e52ba2c823e1 100644 --- a/frontend/appflowy_flutter/packages/appflowy_backend/lib/log.dart +++ b/frontend/appflowy_flutter/packages/appflowy_backend/lib/log.dart @@ -1,5 +1,6 @@ // ignore: import_of_legacy_library_into_null_safe import 'dart:ffi'; + import 'package:ffi/ffi.dart' as ffi; import 'package:flutter/foundation.dart'; import 'package:logger/logger.dart'; @@ -14,13 +15,15 @@ class Log { Log() { _logger = Logger( printer: PrettyPrinter( - methodCount: 2, // number of method calls to be displayed - errorMethodCount: 8, // number of method calls if stacktrace is provided - lineLength: 120, // width of the output - colors: true, // Colorful log messages - printEmojis: true, // Print an emoji for each log message - printTime: false, // Should each log print contain a timestamp - ), + methodCount: 2, // number of method calls to be displayed + errorMethodCount: + 8, // number of method calls if stacktrace is provided + lineLength: 120, // width of the output + colors: true, // Colorful log messages + printEmojis: true, // Print an emoji for each log message + dateTimeFormat: + DateTimeFormat.none // Should each log print contain a timestamp + ), level: kDebugMode ? Level.trace : Level.info, ); } diff --git a/frontend/appflowy_flutter/packages/appflowy_backend/pubspec.yaml b/frontend/appflowy_flutter/packages/appflowy_backend/pubspec.yaml index c014da75dfdcd..51ad23fde4b8a 100644 --- a/frontend/appflowy_flutter/packages/appflowy_backend/pubspec.yaml +++ b/frontend/appflowy_flutter/packages/appflowy_backend/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: isolates: ^3.0.3+8 protobuf: ^3.1.0 freezed_annotation: - logger: ^2.0.0 + logger: ^2.4.0 plugin_platform_interface: ^2.1.3 json_annotation: ^4.7.0 appflowy_result: diff --git a/frontend/appflowy_flutter/pubspec.lock b/frontend/appflowy_flutter/pubspec.lock index f330999d3847c..3d524efc45df2 100644 --- a/frontend/appflowy_flutter/pubspec.lock +++ b/frontend/appflowy_flutter/pubspec.lock @@ -1251,13 +1251,13 @@ packages: source: hosted version: "0.1.5" logger: - dependency: transitive + dependency: "direct main" description: name: logger - sha256: "6bbb9d6f7056729537a4309bda2e74e18e5d9f14302489cc1e93f33b3fe32cac" + sha256: "697d067c60c20999686a0add96cf6aba723b3aa1f83ecf806a8097231529ec32" url: "https://pub.dev" source: hosted - version: "2.0.2+1" + version: "2.4.0" logging: dependency: transitive description: diff --git a/frontend/appflowy_flutter/pubspec.yaml b/frontend/appflowy_flutter/pubspec.yaml index b580961362b9e..2e339373ad437 100644 --- a/frontend/appflowy_flutter/pubspec.yaml +++ b/frontend/appflowy_flutter/pubspec.yaml @@ -144,6 +144,7 @@ dependencies: markdown_widget: ^2.3.2+6 desktop_drop: ^0.4.4 markdown: + logger: ^2.4.0 # Window Manager for MacOS and Linux window_manager: ^0.3.9