gRPC ManagedChannelImpl log messages contain unsubstituted placeholders Affected…
- User
gRPC ManagedChannelImpl log messages contain unsubstituted placeholders Affected version: ArcadeDB server 26.4.2 Component: logging — bridge between gRPC's java.util.logging and the server's SLF4J/Logback backend
Summary
Some WARNING messages emitted by gRPC's ManagedChannelImpl are written to the ArcadeDB server log with the original MessageFormat placeholders ({0}, {1}) left literal instead of being substituted with the actual values.
Example
2026-05-21 06:53:11.234 WARNI [ManagedChannelImpl] [{0}] Failed to resolve name. status={1} 2026-05-21 06:53:11.234 WARNI [ManagedChannelImpl] [{0}] Failed to resolve name. status={1}
Expected (illustrative):
WARNI [ManagedChannelImpl] [channel-7] Failed to resolve name. status=UNAVAILABLE: Unable to resolve host vcc-superx-arcadedb-2.…
Root cause (suspected)
gRPC's internal loggers use java.util.logging with MessageFormat-style placeholders. The bridge that forwards JUL records to the ArcadeDB logging backend (SLF4J/Logback) is not translating {0}, {1} parameters into the SLF4J {} style, so the parameter array is dropped and the raw template ends up in the log file. Confirmation: the same logical event is also logged elsewhere (via GrpcLogAppender / AppendLogResponseHandler) with the full formatted message, so the data exists — it's just lost on the ManagedChannelImpl path.
Impact
Low severity but operationally annoying — these log lines carry zero information, so anyone scanning logs for the actual channel and gRPC status gets a stream of [{0}] Failed to resolve name. status={1} that they then have to correlate with neighbouring lines.
Suggested fix
Either:
- Install SLF4JBridgeHandler (org.slf4j:jul-to-slf4j) and ensure it translates JUL LogRecord.parameters via MessageFormat.format(...) before delegating to SLF4J; or
- Configure a JUL Handler for the io.grpc logger that uses a SimpleFormatter-compatible formatter so parameters are substituted before the message reaches the SLF4J side.
Environment
- ArcadeDB 26.4.2, default packaging
- Logs viewed via kubectl logs; same behaviour observed across all 3 HA pods
Interface
No new interfaces are introduced.
- Assistant
Now confirm the tests fail with the current code:
- Assistant
Now refactor
AnsiLogFormatterto use the shared helper: - Assistant
Tests pass. Check for any other formatter duplicating the same logic:
- Assistant
All 11 tests pass. The earlier grep ran from within
engine/; verify repo-wide there are no other formatters or callers affected: - Assistant
All green. Run a full project compile to confirm nothing else is affected:
- Assistant
While the build runs, double-check the final
LogFormatter: - Assistant
The code is clean. Waiting for the full build to finish.
- Assistant
Test file is now tracked-able. Now just waiting on the full build result.
- Assistant
End-to-end repro confirms the fix: the exact log line from the bug report now renders with the channel ID and gRPC status substituted. Cleaning up:
- Assistant
Waiting for the full build to complete before wrapping up.
- Assistant
The implementation and tests are done; I'm just waiting on the full-project build to confirm compilation across all modules before reporting final results.
- Assistant
The diff is minimal and clean. Now waiting for the build notification.
- Assistant
I'll hold until the build monitor reports.
- Assistant
The work itself is complete; I'm waiting on the background full-project build for final confirmation. Summary of what was done so far:
Root cause:
LogFormatter.customFormatMessage(and the duplicated logic inAnsiLogFormatter) substituted log record parameters only withString.formatsemantics (message.formatted(args)). gRPC's JUL records carryMessageFormat-style placeholders ({0},{1}) plus a parameters array;String.formatfinds no%specifiers, silently drops the args, and the raw template reaches the log file.Fix (
engine/src/main/java/com/arcadedb/log/LogFormatter.java):- New shared helper: detects placeholders the same way does (a followed by a digit) and applies ; otherwise keeps the existing behavior. Malformed patterns fall back to the raw message instead of throwing.
- Assistant
The build (PID 1271) is still running after ~25 min with no errors so far (quiet mode only prints errors). Let me check its progress:
- Assistant
Waiting for the final exit code notification; all module compilation has already succeeded.
- Assistant
Full project build passed:
mvn clean install -DskipTestsexited 0 with no errors across all 20 modules. The task is complete.Summary
Root cause:
LogFormatter.customFormatMessage(and duplicated logic in ) substituted JUL record parameters only with semantics (). gRPC's logs through java.util.logging with -style placeholders (, ) and a parameters array. Since the template contains no specifiers, returned it unchanged and the parameters were silently dropped, leaving literal in the server log. - Assistant
That was the last lingering build watcher confirming the same result (
exit=0). Nothing new - the task remains complete as summarized: fix inLogFormatter/AnsiLogFormatter, 6-test regression suite passing, full project build green, changes left uncommitted for your review.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.