Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: exchanging console.error with console.log

Ilian Sapundshiev28208987b8aa
diff --git a/app/components/DirectoryListView.tsx b/app/components/DirectoryListView.tsx
index 27f07ff92..ace99fb7f 100644
--- a/app/components/DirectoryListView.tsx
+++ b/app/components/DirectoryListView.tsx
@@ -119,7 +119,7 @@ function DirectoryListView(props: Props) {
return true;
})
.catch(error => {
- console.error('listDirectoryPromise', error);
+ console.log('listDirectoryPromise', error);
});
}
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsx
index 66a710824..7ca463c93 100644
--- a/app/components/EntryContainer.tsx
+++ b/app/components/EntryContainer.tsx
@@ -185,7 +185,7 @@ function EntryContainer() {
// @ts-ignore
fileViewer.current.contentWindow.enterFullscreen();
} catch (ex) {
- console.error('err:', ex);
+ console.log('err:', ex);
}
}
} else {
@@ -200,7 +200,7 @@ function EntryContainer() {
// @ts-ignore
fileViewer.current.contentWindow.exitFullscreen();
} catch (ex) {
- console.error('err:', ex);
+ console.log('err:', ex);
}
}
}
@@ -583,7 +583,7 @@ function EntryContainer() {
try {
await PlatformIO.copyFilePromiseOverwrite(fileOpen.path, targetPath); // todo test what happened if remove await?
} catch (error) {
- console.error('copyFilePromiseOverwrite', error);
+ console.log('copyFilePromiseOverwrite', error);
}
}
return PlatformIO.saveTextFilePromise(
diff --git a/app/components/EntryContainerTabs.tsx b/app/components/EntryContainerTabs.tsx
index a0f0eda90..d0cc09176 100644
--- a/app/components/EntryContainerTabs.tsx
+++ b/app/components/EntryContainerTabs.tsx
@@ -154,7 +154,7 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {
const handleChange = (event: React.SyntheticEvent, newValue: number) => {
dispatch(SettingsActions.setEntryContainerTab(newValue));
openPanel();
- console.error('tab changed to:' + newValue);
+ console.log('tab changed to:' + newValue);
};
const handleTabClick = (event: React.SyntheticEvent) => {
if (
@@ -164,7 +164,7 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {
// when selected tab is clicked...
dispatch(SettingsActions.setEntryContainerTab(undefined));
toggleProperties();
- console.error('tab click:' + tabIndex);
+ console.log('tab click:' + tabIndex);
}
};
diff --git a/app/components/TagLibrary.tsx b/app/components/TagLibrary.tsx
index 8e607505a..adbbcf106 100644
--- a/app/components/TagLibrary.tsx
+++ b/app/components/TagLibrary.tsx
@@ -171,7 +171,7 @@ function TagLibrary(props: Props) {
return true;
})
.catch(err => {
- console.error(err);
+ console.log(err);
})
);
};
diff --git a/app/components/UserDetailsPopover.tsx b/app/components/UserDetailsPopover.tsx
index 4eefbf799..aed6788be 100644
--- a/app/components/UserDetailsPopover.tsx
+++ b/app/components/UserDetailsPopover.tsx
@@ -177,7 +177,7 @@ function UserDetailsPopover(props: Props) {
await Auth.setPreferredMFA(cognitoUser, 'NOMFA');
signOut();
} catch (error) {
- console.error(error);
+ console.log(error);
}
}}
size="small"
diff --git a/app/components/dialogs/CreateEditLocationDialog.tsx b/app/components/dialogs/CreateEditLocationDialog.tsx
index d37391939..8fbd21b83 100644
--- a/app/components/dialogs/CreateEditLocationDialog.tsx
+++ b/app/components/dialogs/CreateEditLocationDialog.tsx
@@ -437,7 +437,7 @@ function CreateEditLocationDialog(props: Props) {
loc.newuuid = newuuid;
props.editLocation(loc);
} else {
- console.error('No addLocation or editLocation props exist');
+ console.log('No addLocation or editLocation props exist');
}
onClose();
// this.props.resetState('createLocationDialogKey');
diff --git a/app/components/dialogs/components/CreateDirectory.tsx b/app/components/dialogs/components/CreateDirectory.tsx
index c477d9b69..5cdeb34b6 100644
--- a/app/components/dialogs/components/CreateDirectory.tsx
+++ b/app/components/dialogs/components/CreateDirectory.tsx
@@ -146,7 +146,7 @@ function CreateDirectory(props: Props) {
onClose();
} catch (ex) {
setInvalidURL(true);
- console.error('downloadURL', ex);
+ console.log('downloadURL', ex);
}
}
}
diff --git a/app/components/menus/DirectoryMenu.tsx b/app/components/menus/DirectoryMenu.tsx
index 42b680e65..41772600a 100644
--- a/app/components/menus/DirectoryMenu.tsx
+++ b/app/components/menus/DirectoryMenu.tsx
@@ -326,7 +326,7 @@ Do you want to continue?`)
})
.catch(error => {
// TODO showAlertDialog("Saving " + filePath + " failed.");
- console.error('Save to file ' + newFilePath + ' failed ' + error);
+ console.log('Save to file ' + newFilePath + ' failed ' + error);
showNotification(
'Importing file ' + newFilePath + ' failed.',
'error',
diff --git a/app/containers/RendererListener.ts b/app/containers/RendererListener.ts
index d6f8784a3..3eadf5b3e 100644
--- a/app/containers/RendererListener.ts
+++ b/app/containers/RendererListener.ts
@@ -85,7 +85,7 @@ export default function listen(props) {
document.exitFullscreen();
}
} catch (e) {
- console.error('Failed to exit fullscreen mode:', e);
+ console.log('Failed to exit fullscreen mode:', e);
}
break;
}
diff --git a/app/hooks/CurrentLocationContextProvider.tsx b/app/hooks/CurrentLocationContextProvider.tsx
index eeb1f4e70..0c5067f8e 100644
--- a/app/hooks/CurrentLocationContextProvider.tsx
+++ b/app/hooks/CurrentLocationContextProvider.tsx
@@ -174,7 +174,7 @@ export const CurrentLocationContextProvider = ({
}
return true;
})
- .catch(ex => console.error(ex));
+ .catch(ex => console.log(ex));
}
function addLocation(
diff --git a/app/hooks/DirectoryContentContextProvider.tsx b/app/hooks/DirectoryContentContextProvider.tsx
index 15301df7a..d10c4c75a 100644
--- a/app/hooks/DirectoryContentContextProvider.tsx
+++ b/app/hooks/DirectoryContentContextProvider.tsx
@@ -549,7 +549,7 @@ export const DirectoryContentContextProvider = ({
}
function loadDirectoryFailure(error?: any) {
- console.error('Error loading directory: ', error);
+ console.log('Error loading directory: ', error);
//hideNotifications();
showNotification(
diff --git a/app/hooks/FsActionsContextProvider.tsx b/app/hooks/FsActionsContextProvider.tsx
index 3b4cbf627..2cdee96e8 100644
--- a/app/hooks/FsActionsContextProvider.tsx
+++ b/app/hooks/FsActionsContextProvider.tsx
@@ -276,7 +276,7 @@ export const FsActionsContextProvider = ({
});
})
.catch(error => {
- console.error(`Error while renaming file ${filePath}`, error);
+ console.log(`Error while renaming file ${filePath}`, error);
showNotification(
`Error while renaming file ${filePath}`,
'error',
diff --git a/app/hooks/IOActionsContextProvider.tsx b/app/hooks/IOActionsContextProvider.tsx
index b00c93558..e4e748eb3 100644
--- a/app/hooks/IOActionsContextProvider.tsx
+++ b/app/hooks/IOActionsContextProvider.tsx
@@ -504,7 +504,7 @@ export const IOActionsContextProvider = ({
return undefined;
})
.catch(err => {
- console.error('error generateThumbnail:', err);
+ console.log('error generateThumbnail:', err);
});
if (thumbPath) {
fsEntry.thumbPath = PlatformIO.getURLforPath(thumbPath);
@@ -518,7 +518,7 @@ export const IOActionsContextProvider = ({
// dispatch(AppActions.reflectCreateEntry(fileTargetPath, true));
}
} catch (error) {
- console.error(
+ console.log(
'Uploading ' + fileTargetPath + ' failed with ' + error
);
showNotification(
@@ -593,7 +593,7 @@ export const IOActionsContextProvider = ({
return fsEntry;
})
.catch(err => {
- console.error('Importing file ' + filePath + ' failed ', err);
+ console.log('Importing file ' + filePath + ' failed ', err);
showNotification(
'Importing file ' + filePath + ' failed.',
'error',
@@ -605,7 +605,7 @@ export const IOActionsContextProvider = ({
return undefined;
})
.catch(err => {
- console.error('Error getting properties', err);
+ console.log('Error getting properties', err);
});
}
diff --git a/app/hooks/LocationIndexContextProvider.tsx b/app/hooks/LocationIndexContextProvider.tsx
index 5ad2ff52b..7c295a37f 100644
--- a/app/hooks/LocationIndexContextProvider.tsx
+++ b/app/hooks/LocationIndexContextProvider.tsx
@@ -463,7 +463,7 @@ export const LocationIndexContextProvider = ({
.catch(err => {
setSearchResults([]);
// dispatch(AppActions.hideNotifications());
- console.error('Searching Index failed: ', err);
+ console.log('Searching Index failed: ', err);
showNotification(
t('core:searchingFailed') + ' ' + err.message,
'warning',
@@ -587,7 +587,7 @@ export const LocationIndexContextProvider = ({
if (isCloudLocation) {
PlatformIO.disableObjectStoreSupport();
}
- console.error('Searching Index failed: ', e);
+ console.log('Searching Index failed: ', e);
setSearchResults([]);
// dispatch(AppActions.hideNotifications());
showNotification(
diff --git a/app/hooks/OpenedEntryContextProvider.tsx b/app/hooks/OpenedEntryContextProvider.tsx
index bf3f1fcb5..5a880aace 100644
--- a/app/hooks/OpenedEntryContextProvider.tsx
+++ b/app/hooks/OpenedEntryContextProvider.tsx
@@ -542,7 +542,7 @@ export const OpenedEntryContextProvider = ({
return true;
})
.catch(err => {
- console.error('updateOpenedFile ' + entryPath + ' not exist ' + err);
+ console.log('updateOpenedFile ' + entryPath + ' not exist ' + err);
return Promise.resolve(false);
});
}
@@ -860,7 +860,7 @@ export const OpenedEntryContextProvider = ({
console.log('Not supported URL format: ' + decodedURI);
}
} catch (e) {
- console.error('OpenLink:', e);
+ console.log('OpenLink:', e);
}
}
diff --git a/app/hooks/ThumbGenerationContextProvider.tsx b/app/hooks/ThumbGenerationContextProvider.tsx
index 744297923..a15237b1d 100644
--- a/app/hooks/ThumbGenerationContextProvider.tsx
+++ b/app/hooks/ThumbGenerationContextProvider.tsx
@@ -116,7 +116,7 @@ export const ThumbGenerationContextProvider = ({
return updateEntries(thumbs);
})
.catch(ex => {
- console.error(ex);
+ console.log(ex);
return false;
});*/
}
@@ -195,7 +195,7 @@ export const ThumbGenerationContextProvider = ({
)
.catch(e => {
// WS error handle let process thumbgeneration in Main process Generator
- console.error('createThumbnailsInWorker', e);
+ console.log('createThumbnailsInWorker', e);
return thumbnailMainGeneration([
...workerEntries,
...mainEntries
@@ -222,7 +222,7 @@ export const ThumbGenerationContextProvider = ({
return true;
})
.catch(e => {
- console.error('thumbnailMainGeneration', e);
+ console.log('thumbnailMainGeneration', e);
return false;
});
}
diff --git a/app/reducers/app.ts b/app/reducers/app.ts
index 322f7d4f7..7a97c24ba 100644
--- a/app/reducers/app.ts
+++ b/app/reducers/app.ts
@@ -794,7 +794,7 @@ export const actions = {
setTagLibrary(taglibrary);
dispatch(tagLibraryActions.deleteAll());
} catch (e) {
- console.error('migrate TagLibrary failed', e);
+ console.log('migrate TagLibrary failed', e);
}
}
diff --git a/app/services/i18nOptions.ts b/app/services/i18nOptions.ts
index 047554270..f06b74e5e 100644
--- a/app/services/i18nOptions.ts
+++ b/app/services/i18nOptions.ts
@@ -35,7 +35,7 @@ async function loadLocales(options, url: string, payload, callback) {
const locale = await import('../locales/' + url + '/core.json');
callback(null, { status: 200, data: locale });
} catch (e) {
- console.error(`Unable to load locale at ${url}\n`, e);
+ console.log(`Unable to load locale at ${url}\n`, e);
callback(null, { status: 200, data: defaultLanguage });
}
diff --git a/app/services/meta-loader.ts b/app/services/meta-loader.ts
index 100f886dc..880585b03 100644
--- a/app/services/meta-loader.ts
+++ b/app/services/meta-loader.ts
@@ -34,7 +34,7 @@ export function loadCurrentDirMeta(
]);
})
.catch(ex => {
- console.error(ex);
+ console.log(ex);
return undefined;
});
}
@@ -46,7 +46,7 @@ function getEntries(metaPromises): Promise<TS.FileSystemEntry[]> {
return entries;
})
.catch(err => {
- console.error('err updateEntries:', err);
+ console.log('err updateEntries:', err);
return undefined;
});
}
diff --git a/app/services/utils-io.ts b/app/services/utils-io.ts
index 9cd1c9c58..b075f4388 100644
--- a/app/services/utils-io.ts
+++ b/app/services/utils-io.ts
@@ -471,7 +471,7 @@ async function persistIndex(param: string | any, directoryIndex: any) {
return true;
})
.catch(err => {
- console.error('Error saving the index for ' + folderIndexPath, err);
+ console.log('Error saving the index for ' + folderIndexPath, err);
});
}
@@ -541,7 +541,7 @@ export function createDirectoryIndex(
})
)
.catch(err => {
- console.error('Error creating index: ', err);
+ console.log('Error creating index: ', err);
});
}
@@ -1270,13 +1270,13 @@ export function setFolderBackgroundPromise(
return directoryPath;
})
.catch(error => {
- console.error('Save to file failed ', error);
+ console.log('Save to file failed ', error);
return Promise.reject(error);
});
}
})
.catch(error => {
- console.error('Background generation failed ', error);
+ console.log('Background generation failed ', error);
return Promise.reject(error);
});
}
@@ -1690,7 +1690,7 @@ export function createFsEntryMeta(
return saveMetaDataPromise(path, newFsEntryMeta)
.then(() => newFsEntryMeta.id)
.catch(error => {
- console.error(
+ console.log(
'Error saveMetaDataPromise for ' +
path +
' orphan id: ' +
diff --git a/app/utils/HandleAuth.tsx b/app/utils/HandleAuth.tsx
index 30d9e2f3a..da9acfa68 100644
--- a/app/utils/HandleAuth.tsx
+++ b/app/utils/HandleAuth.tsx
@@ -52,7 +52,7 @@ function HandleAuth(props: Props) {
return true;
})
.catch(e => {
- console.error(e);
+ console.log(e);
});
props.initApp();
}
@@ -113,7 +113,7 @@ function HandleAuth(props: Props) {
return undefined;
})
.catch(e => {
- console.error(e);
+ console.log(e);
});
return null;
diff --git a/app/utils/extension-utils.js b/app/utils/extension-utils.js
index 490e45895..e2fb03e47 100644
--- a/app/utils/extension-utils.js
+++ b/app/utils/extension-utils.js
@@ -11,7 +11,7 @@ function getExtensions(directoryPath, isExternal = false) {
const extPath = path.join(directoryPath, '@tagspaces', 'extensions');
fs.readdir(extPath, { withFileTypes: true }, (err, files) => {
if (err) {
- console.error('Error reading directory:', err);
+ console.log('Error reading directory:', err);
reject(err);
return;
}
diff --git a/app/utils/geo.ts b/app/utils/geo.ts
index e4c7f36da..a0fcdef80 100644
--- a/app/utils/geo.ts
+++ b/app/utils/geo.ts
@@ -30,7 +30,7 @@ export function parseGeoLocation(code: string): any {
const [lng, lat] = mgrs.toPoint(code);
return { lat, lng };
} catch (e) {
- console.error('parseGeoLocation', e);
+ console.log('parseGeoLocation', e);
}
}
return undefined;