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 using command. Additionally, you can use and to temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call ) using or commands. However you don't need to use or before submitting your changes. In fact, only submits currently unstaged changes because it uses to get the changes that need to be submitted. Assistant
Now let's implement the shared helper method for formatting messages that handles both
%s-style and MessageFormat{0}-style placeholders.Assistant
Now let's update AnsiLogFormatter to use this shared helper instead of duplicating the (buggy) logic.
Assistant
Right, IllegalFormatException extends IllegalArgumentException. Let's just catch
IllegalArgumentExceptionalone.Assistant
Now recompile.
Assistant
Compiles fine. Now let's write a quick reproduction script to confirm the fix works for both MessageFormat-style and
%s-style placeholders.Assistant
The fix resolves the issue: MessageFormat-style
{0}/{1}placeholders are now substituted correctly, while the existing%s/%d-style ArcadeDB messages continue to work as before, and messages without params are unaffected.Now let's check if there's also a
GrpcLoggingInterceptoror a JUL handler config specific to grpc that might need adjustment, and check existing tests related to logging.Assistant
Let's run the full existing test suite related to logging to make sure nothing breaks.
Assistant
Test passed silently (no failures reported). Let's also check for any other test classes referencing DefaultLogger or log-related functionality broadly, and run the full engine test module for log package to be safe.
Assistant
Good, tests pass. Let's clean up the temp reproduction files and view final diff.
Assistant
Looks clean. Now let's build the whole grpcw module too, since the issue mentions gRPC logging bridge specifically, to be sure nothing else needs updating there.
Assistant
These are just Level usages via ArcadeDB's own log calls (not JUL loggers themselves), so no changes needed there. The fix is centralized in the shared formatter classes which is the actual bridge point. Let's run the broader engine test suite for logging-related tests to be extra safe, and do a final full build.
Assistant
Build succeeds. Let's finalize by reviewing the checklist.
Assistant
Let's verify explicitly that the bug existed before the fix (rebuild with old code, run repro, then restore).
Assistant
Confirmed: the bug is reproduced with the original code (
[{0}]andstatus={1}literal). Now restore the fix.Assistant
The fix works: with the change applied, the placeholders
{0}and{1}are correctly substituted withchannel-7andUNAVAILABLE: Unable to resolve hostrespectively.Now let's run the full engine test suite (or at least the logging-related and a broader sanity subset) to ensure nothing broke.
Assistant
All good. Let's also do a broader build of the grpcw module to make sure the entire chain still compiles fine, given it's the reported module in the issue.
Assistant
Everything builds and passes. Let's view the final diff once more for a clean review.
Assistant
This is a clean, minimal fix. Now let me go through the checklist explicitly.
Checklist review:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.