openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 785 B
JavaScript
import{t as createDedupeCache}from"./dedupe-CsfmSvUH.mjs";
//!src/channels/logging.ts
const inboundDropWarnings=createDedupeCache({ttlMs:0,maxSize:512});function logInboundDrop(e){if(e.onceKey!==void 0&&inboundDropWarnings.check(JSON.stringify([e.channel,e.reason,e.onceKey])))return;const t=e.target?` target=${e.target}`:``;const n=e.hint?`. ${e.hint}`:``;e.log(`${e.channel}: drop ${e.reason}${t}${n}`)}function logTypingFailure(e){const t=e.target?` target=${e.target}`:``;const n=e.action?` action=${e.action}`:``;e.log(`${e.channel} typing${n} failed${t}: ${String(e.error)}`)}function logAckFailure(e){const t=e.target?` target=${e.target}`:``;e.log(`${e.channel} ack cleanup failed${t}: ${String(e.error)}`)}export{logInboundDrop as n,logTypingFailure as r,logAckFailure as t};