From d9dacbc901c149daaea68f551d46a1d1b4a3bbde Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 25 Jul 2022 12:23:30 +0100 Subject: [PATCH] Use warn rather than info when notifying about ignored conflicts --- packages/backend-core/src/cache/writethrough.ts | 4 ++-- packages/backend-core/src/logging.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/backend-core/src/cache/writethrough.ts b/packages/backend-core/src/cache/writethrough.ts index 701351d75b..ec6b1604c8 100644 --- a/packages/backend-core/src/cache/writethrough.ts +++ b/packages/backend-core/src/cache/writethrough.ts @@ -1,6 +1,6 @@ import BaseCache from "./base" import { getWritethroughClient } from "../redis/init" -import { logInfo } from "../logging" +import { logWarn } from "../logging" const DEFAULT_WRITE_RATE_MS = 10000 let CACHE: BaseCache | null = null @@ -53,7 +53,7 @@ export async function put( throw err } else { // Swallow 409s but log them - logInfo(`Ignoring conflict in write-through cache`) + logWarn(`Ignoring conflict in write-through cache`) } } } diff --git a/packages/backend-core/src/logging.ts b/packages/backend-core/src/logging.ts index 63bdc092e9..8eda15ac79 100644 --- a/packages/backend-core/src/logging.ts +++ b/packages/backend-core/src/logging.ts @@ -15,11 +15,11 @@ export function logAlert(message: string, e?: any) { console.error(`bb-alert: ${message} ${errorJson}`) } -export function logInfo(message: string) { - console.log(`bb-info: ${message}`) +export function logWarn(message: string) { + console.warn(`bb-warn: ${message}`) } export default { logAlert, - logInfo, + logWarn, }