MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / writeSequencedDebugLog

Function writeSequencedDebugLog

src/core/sequenced_stderr.ts:38–54  ·  view source on GitHub ↗
(
  tag: string,
  event: string,
  payload: unknown,
  {
    envVar = 'CODEXBRIDGE_DEBUG_WEIXIN',
  }: SequencedStderrOptions = {},
)

Source from the content-addressed store, hash-verified

36}
37
38export function writeSequencedDebugLog(
39 tag: string,
40 event: string,
41 payload: unknown,
42 {
43 envVar = 'CODEXBRIDGE_DEBUG_WEIXIN',
44 }: SequencedStderrOptions = {},
45): void {
46 if (!shouldWrite(envVar)) {
47 return;
48 }
49 try {
50 writeSequencedStderrLine(`[${tag}] ${event} ${JSON.stringify(payload)}`);
51 } catch {
52 writeSequencedStderrLine(`[${tag}] ${event}`);
53 }
54}

Callers 6

debugCoordinatorFunction · 0.70
debugRuntimeFunction · 0.50
debugWeixinFunction · 0.50
debugWeixinMediaFunction · 0.50
debugCdnUploadFunction · 0.50
debugWeixinUploadFunction · 0.50

Calls 2

shouldWriteFunction · 0.70
writeSequencedStderrLineFunction · 0.70

Tested by

no test coverage detected