MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / warnIfLogFlushFails

Function warnIfLogFlushFails

packages/agent-core/src/rpc/core-impl.ts:1223–1237  ·  view source on GitHub ↗
(
  exportLog: Logger,
  message: string,
  flush: () => Promise<boolean>,
)

Source from the content-addressed store, hash-verified

1221}
1222
1223async function warnIfLogFlushFails(
1224 exportLog: Logger,
1225 message: string,
1226 flush: () => Promise<boolean>,
1227): Promise<void> {
1228 try {
1229 if (await flush()) return;
1230 exportLog.warn(message);
1231 } catch (error) {
1232 exportLog.warn(message, { error });
1233 }
1234 try {
1235 await flush();
1236 } catch {}
1237}

Callers 1

exportSessionMethod · 0.85

Calls 2

warnMethod · 0.65
flushFunction · 0.50

Tested by

no test coverage detected