From 600738fc0e1499d6a470465e73558d66d83cf2fa Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Fri, 8 May 2020 10:35:45 +0200 Subject: [PATCH] FolderLoading: Output loading info to logs as verbose The most common issue is why a certain file is not being loaded. This isn't the ideal way, but it's a quick fix in order to diagnose what is going on. --- lib/core/notes_folder_fs.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/core/notes_folder_fs.dart b/lib/core/notes_folder_fs.dart index ac4e7ebb..de834889 100644 --- a/lib/core/notes_folder_fs.dart +++ b/lib/core/notes_folder_fs.dart @@ -186,12 +186,12 @@ class NotesFolderFS with NotesFolderNotifier implements NotesFolder { } if (fsEntity is Directory) { - //Log.d("Found directory ${fsEntity.path}"); + Log.v("Found directory ${fsEntity.path}"); var subFolder = NotesFolderFS(this, fsEntity.path); if (subFolder.name.startsWith('.')) { continue; } - //Log.d("Found folder ${fsEntity.path}"); + Log.v("Found folder ${fsEntity.path}"); _addFolderListeners(subFolder); _folders.add(subFolder); @@ -204,10 +204,10 @@ class NotesFolderFS with NotesFolderNotifier implements NotesFolder { var note = Note(this, fsEntity.path); if (!note.filePath.toLowerCase().endsWith('.md')) { - //Log.d("Ignoring file ${fsEntity.path}"); + Log.v("Ignoring file ${fsEntity.path}"); continue; } - //Log.d("Found file ${fsEntity.path}"); + Log.v("Found file ${fsEntity.path}"); _addNoteListeners(note); _notes.add(note); @@ -226,7 +226,7 @@ class NotesFolderFS with NotesFolderNotifier implements NotesFolder { _entityMap.remove(path); if (e is Note) { - Log.d("File $path was no longer found"); + Log.v("File $path was no longer found"); _removeNoteListeners(e); var i = _notes.indexWhere((n) => n.filePath == path); @@ -235,7 +235,7 @@ class NotesFolderFS with NotesFolderNotifier implements NotesFolder { _notes.removeAt(i); notifyNoteRemoved(i, note); } else { - Log.d("Folder $path was no longer found"); + Log.v("Folder $path was no longer found"); _removeFolderListeners(e); var i = _folders.indexWhere((f) => f.folderPath == path);