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 () => {
await new Promise((resolve) =>
setTimeout(() => {
console.log("Timeout");
resolve("");
}, 1000)
);

View File

@ -58,7 +58,7 @@ const handleFetchAnnotationSettings = async () => {
);
annotationSettings.value = data.items;
} 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[];
console.log(contents);
editor.value
?.chain()
.focus()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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