Skip to content

Commit

Permalink
chore: update logger version
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 committed Jul 16, 2024
1 parent 42141fe commit 0631726
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -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,
}
Expand Down Expand Up @@ -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,
);
Expand Down
17 changes: 10 additions & 7 deletions frontend/appflowy_flutter/packages/appflowy_backend/lib/log.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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,
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions frontend/appflowy_flutter/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions frontend/appflowy_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0631726

Please sign in to comment.