fix: hide probe logs without verbose
This commit is contained in:
@@ -21,6 +21,7 @@ Docs: https://docs.clawd.bot
|
|||||||
- CLI: suppress diagnostic session/run noise during auth probes.
|
- CLI: suppress diagnostic session/run noise during auth probes.
|
||||||
- CLI: hide auth probe timeout warnings from embedded runs.
|
- CLI: hide auth probe timeout warnings from embedded runs.
|
||||||
- CLI: render auth probe results as a table in `clawdbot models status`.
|
- CLI: render auth probe results as a table in `clawdbot models status`.
|
||||||
|
- CLI: suppress probe-only embedded logs unless `--verbose` is set.
|
||||||
- Linux: include env-configured user bin roots in systemd PATH and align PATH audits. (#1512) Thanks @robbyczgw-cla.
|
- Linux: include env-configured user bin roots in systemd PATH and align PATH audits. (#1512) Thanks @robbyczgw-cla.
|
||||||
- TUI: render Gateway slash-command replies as system output (for example, `/context`).
|
- TUI: render Gateway slash-command replies as system output (for example, `/context`).
|
||||||
- Media: preserve PNG alpha when possible; fall back to JPEG when still over size cap. (#1491) Thanks @robbyczgw-cla.
|
- Media: preserve PNG alpha when possible; fall back to JPEG when still over size cap. (#1491) Thanks @robbyczgw-cla.
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import type { Logger as TsLogger } from "tslog";
|
|||||||
import { CHAT_CHANNEL_ORDER } from "../channels/registry.js";
|
import { CHAT_CHANNEL_ORDER } from "../channels/registry.js";
|
||||||
import { defaultRuntime, type RuntimeEnv } from "../runtime.js";
|
import { defaultRuntime, type RuntimeEnv } from "../runtime.js";
|
||||||
import { getConsoleSettings, shouldLogSubsystemToConsole } from "./console.js";
|
import { getConsoleSettings, shouldLogSubsystemToConsole } from "./console.js";
|
||||||
|
import { isVerbose } from "../globals.js";
|
||||||
import { type LogLevel, levelToMinLevel } from "./levels.js";
|
import { type LogLevel, levelToMinLevel } from "./levels.js";
|
||||||
import { getChildLogger } from "./logger.js";
|
import { getChildLogger } from "./logger.js";
|
||||||
import { loggingState } from "./state.js";
|
import { loggingState } from "./state.js";
|
||||||
@@ -220,10 +221,18 @@ export function createSubsystemLogger(subsystem: string): SubsystemLogger {
|
|||||||
logToFile(getFileLogger(), level, message, fileMeta);
|
logToFile(getFileLogger(), level, message, fileMeta);
|
||||||
if (!shouldLogToConsole(level, { level: consoleSettings.level })) return;
|
if (!shouldLogToConsole(level, { level: consoleSettings.level })) return;
|
||||||
if (!shouldLogSubsystemToConsole(subsystem)) return;
|
if (!shouldLogSubsystemToConsole(subsystem)) return;
|
||||||
|
const consoleMessage = consoleMessageOverride ?? message;
|
||||||
|
if (
|
||||||
|
!isVerbose() &&
|
||||||
|
subsystem === "agent/embedded" &&
|
||||||
|
/(sessionId|runId)=probe-/.test(consoleMessage)
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const line = formatConsoleLine({
|
const line = formatConsoleLine({
|
||||||
level,
|
level,
|
||||||
subsystem,
|
subsystem,
|
||||||
message: consoleSettings.style === "json" ? message : (consoleMessageOverride ?? message),
|
message: consoleSettings.style === "json" ? message : consoleMessage,
|
||||||
style: consoleSettings.style,
|
style: consoleSettings.style,
|
||||||
meta: fileMeta,
|
meta: fileMeta,
|
||||||
});
|
});
|
||||||
@@ -241,6 +250,13 @@ export function createSubsystemLogger(subsystem: string): SubsystemLogger {
|
|||||||
raw: (message) => {
|
raw: (message) => {
|
||||||
logToFile(getFileLogger(), "info", message, { raw: true });
|
logToFile(getFileLogger(), "info", message, { raw: true });
|
||||||
if (shouldLogSubsystemToConsole(subsystem)) {
|
if (shouldLogSubsystemToConsole(subsystem)) {
|
||||||
|
if (
|
||||||
|
!isVerbose() &&
|
||||||
|
subsystem === "agent/embedded" &&
|
||||||
|
/(sessionId|runId)=probe-/.test(message)
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
writeConsoleLine("info", message);
|
writeConsoleLine("info", message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user