chore: adjust the log level and delete useless logs (#860)

#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

调整部分日志级别,以及删除部分无用的日志。

#### Does this PR introduce a user-facing change?

```release-note
None
```
pull/841/head^2
Ryan Wang 2023-02-17 14:36:15 +08:00 committed by GitHub
parent b949a25558
commit fad0dcc3ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 7 additions and 10 deletions

View File

@ -27,7 +27,6 @@ function handleConfirm() {
onConfirm: async () => { onConfirm: async () => {
await new Promise((resolve) => await new Promise((resolve) =>
setTimeout(() => { setTimeout(() => {
console.log("Timeout");
resolve(""); resolve("");
}, 1000) }, 1000)
); );

View File

@ -58,7 +58,7 @@ const handleFetchAnnotationSettings = async () => {
); );
annotationSettings.value = data.items; annotationSettings.value = data.items;
} catch (error) { } catch (error) {
console.log("Failed to fetch annotation settings", error); console.error("Failed to fetch annotation settings", error);
} }
}; };

View File

@ -337,7 +337,6 @@ export function useAttachmentSelect(
} }
}) })
.filter(Boolean) as Content[]; .filter(Boolean) as Content[];
console.log(contents);
editor.value editor.value
?.chain() ?.chain()
.focus() .focus()

View File

@ -80,7 +80,7 @@ const handleFetchComments = async (options?: {
}, 3000); }, 3000);
} }
} catch (error) { } catch (error) {
console.log("Failed to fetch comments", error); console.error("Failed to fetch comments", error);
} finally { } finally {
loading.value = false; loading.value = false;
} }

View File

@ -69,7 +69,7 @@ const handleDelete = async () => {
Toast.success("删除成功"); Toast.success("删除成功");
} catch (error) { } catch (error) {
console.log("Failed to delete comment", error); console.error("Failed to delete comment", error);
} finally { } finally {
emit("reload"); emit("reload");
} }

View File

@ -57,7 +57,7 @@ const handleDelete = async () => {
Toast.success("删除成功"); Toast.success("删除成功");
} catch (error) { } catch (error) {
console.log("Failed to delete comment reply", error); console.error("Failed to delete comment reply", error);
} finally { } finally {
emit("reload"); emit("reload");
} }

View File

@ -57,7 +57,7 @@ const handleUpdateInBatch = useDebounceFn(async () => {
); );
await Promise.all(promises); await Promise.all(promises);
} catch (e) { } catch (e) {
console.log("Failed to update categories", e); console.error("Failed to update categories", e);
} finally { } finally {
await handleFetchCategories(); await handleFetchCategories();
} }

View File

@ -218,7 +218,6 @@ const { templates } = useThemeCustomTemplates("post");
const publishTime = computed(() => { const publishTime = computed(() => {
const { publishTime } = formState.value.spec; const { publishTime } = formState.value.spec;
if (publishTime) { if (publishTime) {
console.log(toDatetimeLocal(publishTime));
return toDatetimeLocal(publishTime); return toDatetimeLocal(publishTime);
} }
return ""; return "";

View File

@ -145,7 +145,7 @@ const handleUpdateInBatch = useDebounceFn(async () => {
); );
await Promise.all(promises); await Promise.all(promises);
} catch (e) { } catch (e) {
console.log("Failed to update menu items", e); console.error("Failed to update menu items", e);
} finally { } finally {
await menuListRef.value.handleFetchMenus(); await menuListRef.value.handleFetchMenus();
await handleFetchMenuItems({ mute: true }); await handleFetchMenuItems({ mute: true });

View File

@ -56,7 +56,7 @@ const handleGrantPermission = async () => {
}); });
onVisibleChange(false); onVisibleChange(false);
} catch (error) { } catch (error) {
console.log("Failed to grant permission to user", error); console.error("Failed to grant permission to user", error);
} finally { } finally {
saving.value = false; saving.value = false;
} }