mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
Convert more prints to logs
This way they will show up in the LogViewer
This commit is contained in:
@ -103,7 +103,7 @@ class CustomRouteObserver extends RouteObserver<PageRoute<dynamic>> {
|
||||
if (route is PageRoute) {
|
||||
_sendScreenView(route);
|
||||
} else {
|
||||
print("route in not a PageRoute! $route");
|
||||
// print("route in not a PageRoute! $route");
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ class CustomRouteObserver extends RouteObserver<PageRoute<dynamic>> {
|
||||
if (newRoute is PageRoute) {
|
||||
_sendScreenView(newRoute);
|
||||
} else {
|
||||
print("newRoute in not a PageRoute! $newRoute");
|
||||
// print("newRoute in not a PageRoute! $newRoute");
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,8 +123,8 @@ class CustomRouteObserver extends RouteObserver<PageRoute<dynamic>> {
|
||||
if (previousRoute is PageRoute && route is PageRoute) {
|
||||
_sendScreenView(previousRoute);
|
||||
} else {
|
||||
print("previousRoute in not a PageRoute! $previousRoute");
|
||||
print("route in not a PageRoute! $route");
|
||||
// print("previousRoute in not a PageRoute! $previousRoute");
|
||||
// print("route in not a PageRoute! $route");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -194,13 +194,10 @@ class _JournalAppState extends State<JournalApp> {
|
||||
),
|
||||
]);
|
||||
|
||||
print("Nav key $_navigatorKey");
|
||||
|
||||
_initShareSubscriptions();
|
||||
}
|
||||
|
||||
void _afterBuild(BuildContext context) {
|
||||
print("_afterBuild $_pendingShortcut");
|
||||
if (_pendingShortcut != null) {
|
||||
_navigatorKey.currentState.pushNamed("/newNote/$_pendingShortcut");
|
||||
_pendingShortcut = null;
|
||||
|
@ -67,7 +67,7 @@ class NotesCache {
|
||||
Future<void> buildCache(NotesFolderFS rootFolder) async {
|
||||
if (!enabled) return;
|
||||
|
||||
print("Saving the NotesCache");
|
||||
Log.d("Saving the NotesCache");
|
||||
|
||||
var notes = rootFolder.getAllNotes();
|
||||
var sortingMode = rootFolder.config.sortingMode;
|
||||
|
@ -93,12 +93,11 @@ Future<void> initCrashlytics() async {
|
||||
}
|
||||
|
||||
Future<void> reportError(Object error, StackTrace stackTrace) async {
|
||||
Log.e("Uncaught Exception", ex: error, stacktrace: stackTrace);
|
||||
|
||||
if (reportCrashes) {
|
||||
captureSentryException(error, stackTrace);
|
||||
}
|
||||
|
||||
print("Uncaught Exception: $error");
|
||||
print(stackTrace);
|
||||
}
|
||||
|
||||
// Dart makes a distiction between Errors and Exceptions
|
||||
|
@ -71,9 +71,9 @@ class GitHostSetupAutoConfigureState extends State<GitHostSetupAutoConfigure> {
|
||||
try {
|
||||
await gitHost.launchOAuthScreen();
|
||||
} on PlatformException catch (e, stack) {
|
||||
print("LaunchOAuthScreen: Caught platform exception: " + e.toString());
|
||||
print(stack);
|
||||
print("Ignoring it, since I don't know what else to do");
|
||||
Log.d("LaunchOAuthScreen: Caught platform exception:",
|
||||
ex: e, stacktrace: stack);
|
||||
Log.d("Ignoring it, since I don't know what else to do");
|
||||
}
|
||||
} on Exception catch (e, stacktrace) {
|
||||
_handleGitHostException(e, stacktrace);
|
||||
|
@ -188,7 +188,7 @@ class StateContainer with ChangeNotifier {
|
||||
Log.d("Got renameFolder lock");
|
||||
|
||||
var oldFolderPath = folder.folderPath;
|
||||
print("Renaming Folder from $oldFolderPath -> $newFolderName");
|
||||
Log.d("Renaming Folder from $oldFolderPath -> $newFolderName");
|
||||
folder.rename(newFolderName);
|
||||
|
||||
_gitRepo
|
||||
|
@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
import 'package:gitjournal/folder_views/common.dart';
|
||||
import 'package:gitjournal/utils.dart';
|
||||
import 'package:gitjournal/utils/logger.dart';
|
||||
import 'package:gitjournal/widgets/editor_scroll_view.dart';
|
||||
import 'package:gitjournal/widgets/notes_backlinks.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
@ -68,7 +69,7 @@ class NoteViewer extends StatelessWidget {
|
||||
showSnackbar(context, "Link '$link' not found");
|
||||
}
|
||||
} else {
|
||||
print("Launching " + link);
|
||||
Log.i("Launching $link");
|
||||
launch(link);
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user