Skip to content

Commit dc0dffe

Browse files
committed
refactor: update logging level in TRPC middleware from debug to info for improved log clarity
1 parent eb7c47a commit dc0dffe

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/schedule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export async function scheduleRevalidation(
120120
id: eventId,
121121
});
122122

123-
logger.debug("done", {
123+
logger.info("done", {
124124
domain: normalizedDomain,
125125
section,
126126
scheduledAt: new Date(scheduledDueMs).toISOString(),

lib/storage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async function uploadWithRetry(
5858

5959
for (let attempt = 0; attempt < maxAttempts; attempt++) {
6060
try {
61-
logger.debug(`upload attempt ${attempt + 1}/${maxAttempts}`, {
61+
logger.info(`upload attempt ${attempt + 1}/${maxAttempts}`, {
6262
pathname,
6363
});
6464

@@ -90,7 +90,7 @@ async function uploadWithRetry(
9090
UPLOAD_BACKOFF_BASE_MS,
9191
UPLOAD_BACKOFF_MAX_MS,
9292
);
93-
logger.debug(`retrying after ${delay}ms delay`, {
93+
logger.warn(`retrying after ${delay}ms delay`, {
9494
pathname,
9595
durationMs: delay,
9696
});

trpc/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const withLogging = t.middleware(async ({ path, type, input, next }) => {
7070
const { logger } = await import("@/lib/logger/server");
7171

7272
// Log procedure start
73-
logger.debug("procedure start", {
73+
logger.info("procedure start", {
7474
source: "trpc",
7575
path,
7676
type,
@@ -82,7 +82,7 @@ const withLogging = t.middleware(async ({ path, type, input, next }) => {
8282
const durationMs = Math.round(performance.now() - start);
8383

8484
// Log successful completion
85-
logger.debug("procedure ok", {
85+
logger.info("procedure ok", {
8686
source: "trpc",
8787
path,
8888
type,

0 commit comments

Comments
 (0)