Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix(api/log_job): remove log verbosity

mogery4fc7300896d6
diff --git a/apps/api/src/services/logging/log_job.ts b/apps/api/src/services/logging/log_job.ts
index ada3d82c9..ce29cedc2 100644
--- a/apps/api/src/services/logging/log_job.ts
+++ b/apps/api/src/services/logging/log_job.ts
@@ -95,27 +95,16 @@ async function robustInsert(
}
if (attempts.length === 1 && attempts[0].error === null) {
- logger.debug(
- "Inserted into database successfully (" + table + ", " + data.id + ")",
- { attempts },
- );
+ logger.debug("Inserted into database successfully", { attempts });
} else if (
attempts.length > 1 &&
attempts[attempts.length - 1].error === null
) {
- logger.warn(
- "Inserted into database successfully with retries (" +
- table +
- ", " +
- data.id +
- ")",
- { attempts },
- );
+ logger.warn("Inserted into database successfully with retries", {
+ attempts,
+ });
} else {
- logger.error(
- "Failed to insert into database (" + table + ", " + data.id + ")",
- { attempts },
- );
+ logger.error("Failed to insert into database", { attempts });
// Report to Sentry with context
Sentry.captureException(
attempts[attempts.length - 1]?.error ||
@@ -141,16 +130,10 @@ async function robustInsert(
try {
await db.insert(target).values(data);
attempts.push({ error: null, timeMs: Date.now() - start, backoffMs: 0 });
- logger.debug(
- "Inserted into database successfully (" + table + ", " + data.id + ")",
- { attempts },
- );
+ logger.debug("Inserted into database successfully", { attempts });
} catch (error) {
attempts.push({ error, timeMs: Date.now() - start, backoffMs: 0 });
- logger.error(
- "Failed to insert into database (" + table + ", " + data.id + ")",
- { attempts },
- );
+ logger.error("Failed to insert into database", { attempts });
// Report to Sentry
Sentry.captureException(error, {
tags: {