fix: align console logs in multi-provider mode
Suppress individual provider startup messages when running in multi-provider mode to avoid duplicate/conflicting console output. The multi-relay orchestrator provides unified startup messaging. Changes: - Add suppressStartMessage to WebMonitorTuning type - Update monitorWebProvider to suppress startup message when flag set - Update Telegram monitor to suppress initial "Starting..." message - Pass suppressStartMessage: true from multi-relay to both providers Console output before: 📡 Starting 2 provider(s): web, telegram 📡 Starting Telegram relay... 📡 Listening for personal WhatsApp Web inbound messages. Leave this running; Ctrl+C to stop. ✅ All 2 provider(s) active. Listening for messages... (Ctrl+C to stop) Console output after: 📡 Starting 2 provider(s): web, telegram ✅ All 2 provider(s) active. Listening for messages... (Ctrl+C to stop)
This commit is contained in:
parent
15a4631a97
commit
08bede3a0b
@ -59,7 +59,7 @@ export async function runMultiProviderRelay(
|
|||||||
undefined,
|
undefined,
|
||||||
runtime,
|
runtime,
|
||||||
signal,
|
signal,
|
||||||
opts.webTuning,
|
{ ...opts.webTuning, suppressStartMessage: true },
|
||||||
);
|
);
|
||||||
} else if (provider === "twilio") {
|
} else if (provider === "twilio") {
|
||||||
const { monitorTwilio } = await import("../twilio/monitor.js");
|
const { monitorTwilio } = await import("../twilio/monitor.js");
|
||||||
|
|||||||
@ -213,7 +213,9 @@ export async function monitorTelegramProvider(
|
|||||||
verbose,
|
verbose,
|
||||||
};
|
};
|
||||||
|
|
||||||
runtime.log(info("📡 Starting Telegram relay..."));
|
if (!suppressStartMessage) {
|
||||||
|
runtime.log(info("📡 Starting Telegram relay..."));
|
||||||
|
}
|
||||||
|
|
||||||
// Create and initialize provider
|
// Create and initialize provider
|
||||||
const provider = await createInitializedProvider("telegram", providerConfig);
|
const provider = await createInitializedProvider("telegram", providerConfig);
|
||||||
|
|||||||
@ -66,6 +66,7 @@ export type WebMonitorTuning = {
|
|||||||
replyHeartbeatMinutes?: number;
|
replyHeartbeatMinutes?: number;
|
||||||
replyHeartbeatNow?: boolean;
|
replyHeartbeatNow?: boolean;
|
||||||
sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
|
sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
|
||||||
|
suppressStartMessage?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const formatDuration = (ms: number) =>
|
const formatDuration = (ms: number) =>
|
||||||
@ -1246,10 +1247,12 @@ export async function monitorWebProvider(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logInfo(
|
if (!tuning.suppressStartMessage) {
|
||||||
"📡 Listening for personal WhatsApp Web inbound messages. Leave this running; Ctrl+C to stop.",
|
logInfo(
|
||||||
runtime,
|
"📡 Listening for personal WhatsApp Web inbound messages.",
|
||||||
);
|
runtime,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (!keepAlive) {
|
if (!keepAlive) {
|
||||||
await closeListener();
|
await closeListener();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user