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
I'll compile just the needed classes with javac directly rather than full maven build.
Assistant
Let's just compile the two files needed (LogFormatter, AnsiLogFormatter, AnsiCode) individually.
Assistant
Compiled successfully offline. Let's use those classes for repro.
Assistant
Reproduced the bug exactly. Now let's fix
LogFormatter.customFormatMessage(andAnsiLogFormatter.customFormatMessage) to detect MessageFormat-style placeholders and useMessageFormat.formatin that case.Assistant
There's leftover duplicate at lines 152-153. Let's remove that.
Assistant
Now the file looks correct. Let's view the full file to double check.
Assistant
Now let's fix AnsiLogFormatter similarly, reusing the shared method.
Assistant
Now let's recompile and rerun the repro test.
Assistant
The fix works. Now let's test the AnsiLogFormatter and also verify ArcadeDB's own %s-style messages still work correctly (with and without params), plus edge cases like messages with literal
{that aren't MessageFormat placeholders.Assistant
All cases work as expected. Now let's run existing tests related to logging to ensure nothing broke.
Assistant
Let's run this test module.
Assistant
Test passed (no failures reported). Let's confirm with explicit summary.
Assistant
All 4 tests pass. Let's also search for any other tests that might exercise LogFormatter/AnsiLogFormatter directly.
Assistant
Only that test file uses these classes directly. Let's also run the broader engine test suite for the log package to be safe (quick sanity), and check for grpc module tests too since the issue mentions grpc logging.
Assistant
Good, no longer needs the import removed since it's not directly used there anymore, but wildcard imports remain fine (no unused-import errors in javac). Already compiled successfully. Let's do a final full compile of the whole engine module to be sure, and re-run LoggerTest once more for confirmation.
Assistant
Let's clean up the temporary repro files.
Assistant
Now let me review the checklist as requested.
Checklist review:
-
Reproduced the error: Yes — I wrote a small
Repro.javathat fedLogFormatteraLogRecordmimicking gRPC'sManagedChannelImplstyle message ("[{0}] Failed to resolve name. status={1}"with parameters), and confirmed it printed the literal unsubstituted placeholders exactly as described in the issue ([{0}] Failed to resolve name. status={1}). -
Confirmed the fix resolves the error: Yes — after adding
MessageFormat-based substitution (used when the message contains{n}-style placeholders) to bothLogFormatter.customFormatMessageandAnsiLogFormatter.customFormatMessage(via a new sharedformatMessageWithArgumentshelper), re-running the same reproduction script produced the correctly substituted message:[channel-7] Failed to resolve name. status=UNAVAILABLE: something. -
Edge cases considered:
- Messages with no parameters (
additionalArgs == nullor empty) — untouched, returned as-is. - ArcadeDB's own
%s/String.format-style messages, both with and without residual parameters attached to theLogRecord— still handled viaString.formatted(), preserving old behavior exactly (arcadedb messages typically arrive pre-substituted with no parameters attached, perDefaultLogger.log(...)). - Messages containing a literal
{...}that is not a numeric MessageFormat placeholder (e.g., JSON-like text) — correctly falls through to the%s-style path sincecontainsMessageFormatPlaceholdersonly matches{<digits>}patterns, matching the same heuristic used internally by the JDK's defaultFormatter.formatMessage(). - Multiple placeholders (
{0},{1},{2},{3}, ...) — verified working with 4 parameters. - Malformed/invalid patterns that could throw
IllegalArgumentExceptionfromMessageFormat.formatorIllegalFormatExceptionfromString.formattedare both caught and gracefully fall back to returning the original message unchanged, preventing any new logging failures.
- Messages with no parameters (
-
Ran existing tests: Yes — ran
LoggerTest(the only test suite directly exercisingLogFormatter/AnsiLogFormatter) via Maven; all 4 tests passed with no failures or errors. Also did a clean recompilation of theenginemodule to confirm no compilation issues were introduced.
-
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 →