Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
Adjust stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Boehrsi committed Jun 5, 2020
1 parent 3c8897b commit c321310
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/src/log/log_bloc_delegate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ class LogBlocDelegate implements BlocDelegate {

@override
void onEvent(Bloc bloc, Object event) {
_logger.info(event.toString());
_logger.info('Event { bloc: ${bloc.runtimeType}, event: ${event.toString()} }');
}

@override
void onError(Bloc bloc, Object error, StackTrace stacktrace) {
_logger.warning("Error: $error (Stacktrace: $stacktrace, Bloc Runtime-Type: ${bloc.runtimeType})");
_logger.warning('Error { bloc: ${bloc.runtimeType}, error: $error, stacktrace: $stacktrace }');
}

@override
Expand Down
6 changes: 5 additions & 1 deletion lib/src/log/log_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ class LogManager {
final dccLogLevel = event.data2;
final message = "$dccLogLevel: $dccLogMessage";
final logRecord = LogRecord(Level.INFO, message, _coreLoggerName);
_logEntry(logRecord, true);
if (Platform.isIOS) {
_logEntry(logRecord, true); // Enables iOS developers to receive DCC logs during Android Studio sessions
} else if (Platform.isAndroid) {
_writeToLogFile(logRecord);
}
}

Future<void> logDeviceInfo() async {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ packages:
name: background_fetch
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.5"
version: "0.5.6"
bloc:
dependency: "direct main"
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
flutter_localizations:
sdk: flutter
app_settings: ^3.0.0+1
background_fetch: ^0.5.5
background_fetch: ^0.5.6
bloc: ^3.0.0
cached_network_image: ^2.0.0
contacts_service: ^0.3.10
Expand Down

0 comments on commit c321310

Please sign in to comment.