Browse Source

Use warn rather than info when notifying about ignored conflicts

master
Andrew Kingston 4 years ago
parent
commit
d63c547dd6
  1. 4
      packages/backend-core/src/cache/writethrough.ts
  2. 6
      packages/backend-core/src/logging.ts

4
packages/backend-core/src/cache/writethrough.ts

@ -1,6 +1,6 @@
import BaseCache from "./base" import BaseCache from "./base"
import { getWritethroughClient } from "../redis/init" import { getWritethroughClient } from "../redis/init"
import { logInfo } from "../logging" import { logWarn } from "../logging"
const DEFAULT_WRITE_RATE_MS = 10000 const DEFAULT_WRITE_RATE_MS = 10000
let CACHE: BaseCache | null = null let CACHE: BaseCache | null = null
@ -53,7 +53,7 @@ export async function put(
throw err throw err
} else { } else {
// Swallow 409s but log them // Swallow 409s but log them
logInfo(`Ignoring conflict in write-through cache`) logWarn(`Ignoring conflict in write-through cache`)
} }
} }
} }

6
packages/backend-core/src/logging.ts

@ -15,11 +15,11 @@ export function logAlert(message: string, e?: any) {
console.error(`bb-alert: ${message} ${errorJson}`) console.error(`bb-alert: ${message} ${errorJson}`)
} }
export function logInfo(message: string) { export function logWarn(message: string) {
console.log(`bb-info: ${message}`) console.warn(`bb-warn: ${message}`)
} }
export default { export default {
logAlert, logAlert,
logInfo, logWarn,
} }

Loading…
Cancel
Save