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