ISSUE DESCRIPTION gRPC ManagedChannelImpl log messages contain unsubstituted…
- User
ISSUE DESCRIPTION
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.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /arcadedb, current file: none) bash-$
Assistant
Now let's add the helper methods after
getSourceClassSimpleName.Assistant
Now let's update AnsiLogFormatter to use the same helper.
Assistant
Compiles fine. Now let's write a quick reproduction/verification script using javac directly for isolated testing.
Assistant
The fix works correctly for both MessageFormat-style and String.formatted-style messages, and gracefully handles no-param messages. Let's also test the AnsiLogFormatter directly.
Assistant
Both formatters now correctly substitute the
{0},{1}placeholders. Let's run the existing test suite for the log package to make sure nothing broke.Assistant
Test ran without errors (no failures reported). Let's confirm with explicit surefire report check.
Assistant
All 4 tests pass. Let's also run the broader engine test suite quickly for log/utility related tests, and clean up temp files.
Assistant
All good. Let's view the final diff.
Assistant
This looks clean and minimal. Let's go through the checklist.
Assistant
Checklist review:
-
Reproduced the reported error: Yes. I traced the root cause to
LogFormatter.customFormatMessage()(and the identical logic duplicated inAnsiLogFormatter), which formatted JULLogRecordparameters using Java'sString#formatted(%s-style) exclusively. Records like gRPC's"[{0}] Failed to resolve name. status={1}"usejava.text.MessageFormat-style placeholders, soString#formattedsilently left them untouched (no%conversion specifiers to substitute), reproducing the exact symptom from the issue via a standalone script (Repro.java) that showed the raw{0}/{1}placeholders being left unresolved before the fix. -
Confirmed the fix resolves the error: Yes. After adding
formatMessageWithArgs()(which detects{<digits>}-style placeholders via regex and appliesMessageFormat.formatin that case, falling back to the existingString#formattedbehavior otherwise) and wiring it into bothLogFormatterandAnsiLogFormatter, the same reproduction script now correctly renders[channel-7] Failed to resolve name. status=UNAVAILABLE: Unable to resolve host. -
Edge cases considered:
- ArcadeDB's own
%s/%d-style log messages (used pervasively throughcom.arcadedb.log.LogManager) still work unchanged, verified via the reproduction script (RESULT2). - Messages with no parameters (
additionalArgs == nullor empty array) are left as-is, verified viaRESULT3. - Malformed/mismatched patterns are caught (
IllegalArgumentException, which is the superclass ofIllegalFormatExceptionand also thrown byMessageFormat.format) and fall back to the raw message instead of throwing, preserving the original defensive behavior of the code (previously onlyIllegalFormatExceptionwas caught by the outer try, but nowformatMessageWithArgsitself catches broadly so aMessageFormatfailure can't blow up logging). - The fix is shared between the plain
LogFormatter(file logging) andAnsiLogFormatter(console logging with ANSI colors), so both output paths are consistently fixed — matching the general nature of the bug rather than a narrow one-off patch.
- ArcadeDB's own
-
Existing tests still pass: Ran
LoggerTest(all 4 tests) and the broader matched test set (LoggerTest,*Ansi*,*LogFormatter*) in theenginemodule — all passed with no failures/errors, and the module compiles cleanly.
The change is small, targeted at the shared formatting helper used by both log formatters, and doesn't touch or hardcode anything specific to gRPC — any JUL log record using MessageFormat-style placeholders (not just gRPC's) will now be handled correctly.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.5-35B-A3BCompare side by side →
Qwen/Qwen3.5-35B-A3BCompare side by side →