mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-09 07:25:53 +00:00
fix(logging ): use local timezone for console log timestamps (#25970)
Merged via squash.
Prepared head SHA: 30123265b7
Co-authored-by: openperf <80630709+openperf@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
This commit is contained in:
@@ -399,6 +399,7 @@ Docs: https://docs.openclaw.ai
|
||||
|
||||
### Fixes
|
||||
|
||||
- Logging/Subsystem console timestamps: route subsystem console timestamp rendering through `formatConsoleTimestamp(...)` so `pretty` and timestamp-prefix output use local timezone formatting consistently instead of inline UTC `toISOString()` paths. (#25970) Thanks @openperf.
|
||||
- Feishu/Multi-account + reply reliability: add `channels.feishu.defaultAccount` outbound routing support with schema validation, prevent inbound preview text from leaking into prompt system events, keep quoted-message extraction text-first (post/interactive/file placeholders instead of raw JSON), route Feishu video sends as `msg_type: "file"`, and avoid websocket event blocking by using non-blocking event handling in monitor dispatch. Landed from contributor PRs #31209, #29610, #30432, #30331, and #29501. Thanks @stakeswky, @hclsys, @bmendonca3, @patrick-yingxi-pan, and @zwffff.
|
||||
- Feishu/Target routing + replies + dedupe: normalize provider-prefixed targets (`feishu:`/`lark:`), prefer configured `channels.feishu.defaultAccount` for tool execution, honor Feishu outbound `renderMode` in adapter text/caption sends, fall back to normal send when reply targets are withdrawn/deleted, and add synchronous in-memory dedupe guard for concurrent duplicate inbound events. Landed from contributor PRs #30428, #30438, #29958, #30444, and #29463. Thanks @bmendonca3 and @Yaxuan42.
|
||||
- Channels/Multi-account default routing: add optional `channels.<channel>.defaultAccount` default-selection support across message channels so omitted `accountId` routes to an explicit configured account instead of relying on implicit first-entry ordering (fallback behavior unchanged when unset).
|
||||
|
||||
@@ -3,7 +3,11 @@ import type { Logger as TsLogger } from "tslog";
|
||||
import { isVerbose } from "../globals.js";
|
||||
import { defaultRuntime, type RuntimeEnv } from "../runtime.js";
|
||||
import { clearActiveProgressLine } from "../terminal/progress-line.js";
|
||||
import { getConsoleSettings, shouldLogSubsystemToConsole } from "./console.js";
|
||||
import {
|
||||
formatConsoleTimestamp,
|
||||
getConsoleSettings,
|
||||
shouldLogSubsystemToConsole,
|
||||
} from "./console.js";
|
||||
import { type LogLevel, levelToMinLevel } from "./levels.js";
|
||||
import { getChildLogger, isFileLogLevelEnabled } from "./logger.js";
|
||||
import { loggingState } from "./state.js";
|
||||
@@ -197,7 +201,7 @@ function formatConsoleLine(opts: {
|
||||
opts.style === "json" ? opts.subsystem : formatSubsystemForConsole(opts.subsystem);
|
||||
if (opts.style === "json") {
|
||||
return JSON.stringify({
|
||||
time: new Date().toISOString(),
|
||||
time: formatConsoleTimestamp("json"),
|
||||
level: opts.level,
|
||||
subsystem: displaySubsystem,
|
||||
message: opts.message,
|
||||
@@ -218,10 +222,10 @@ function formatConsoleLine(opts: {
|
||||
const displayMessage = stripRedundantSubsystemPrefixForConsole(opts.message, displaySubsystem);
|
||||
const time = (() => {
|
||||
if (opts.style === "pretty") {
|
||||
return color.gray(new Date().toISOString().slice(11, 19));
|
||||
return color.gray(formatConsoleTimestamp("pretty"));
|
||||
}
|
||||
if (loggingState.consoleTimestampPrefix) {
|
||||
return color.gray(new Date().toISOString());
|
||||
return color.gray(formatConsoleTimestamp(opts.style));
|
||||
}
|
||||
return "";
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user