fix: replace console.log with Pino logger in server-side files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Charles GTE
2026-05-15 22:05:13 +02:00
co-authored by Claude Sonnet 4.6
parent 592588ef76
commit 4f14d16452
6 changed files with 23 additions and 11 deletions
+4 -1
View File
@@ -11,6 +11,9 @@ import {StorageChannel} from "@/db/schema/12_storage-channel";
import {
StorageChannelFormType
} from "@/components/wrappers/dashboard/admin/channels/channel/channel-form/channel-form.schema";
import { logger } from "@/lib/logger";
const log = logger.child({ module: "features/storages/dispatch" });
export async function dispatchStorage(
@@ -103,7 +106,7 @@ export async function dispatchStorage(
input,
);
console.log(dispatchResult);
log.debug({ result: dispatchResult }, "Storage dispatch result");
return dispatchResult;
} catch (err: any) {
+4 -1
View File
@@ -1,5 +1,8 @@
"use server";
import {userAction} from "@/lib/safe-actions/actions";
import { logger } from "@/lib/logger";
const log = logger.child({ module: "features/upload/upload.action" });
import {z} from "zod";
import {v4 as uuidv4} from "uuid";
import {db} from "@/db";
@@ -69,7 +72,7 @@ export const uploadUserImageAction = userAction.schema(
}
const result = await dispatchStorage(input, undefined, settings.storageChannel.id);
console.log(result);
log.debug({ result }, "Upload dispatch result");
if (!result.success) {
return {
success: false,