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
I'll start by exploring the repository structure to understand the codebase and find the relevant logging bridge code.
Assistant
I'll start by exploring the repository structure to understand the codebase and find the relevant logging bridge code.
Assistant
Let me explore the logging-related files. The issue mentions a bridge between gRPC's java.util.logging and the server's SLF4J/Logback backend. Let me look at the relevant files.
Assistant
I need to make a single tool call. Let me search for the relevant logging bridge code.
Assistant
Now let me search for where gRPC logging is configured and where the bridge between JUL and SLF4J might be.
Assistant
Let me look at how the server initializes logging and the logback configuration.
Assistant
Let me look at how the server initializes logging, especially the JUL-to-SLF4J bridge.
Assistant
Let me look at the DefaultLogger and Logger classes in the engine, which appear to be the core logging implementation.
Assistant
Now let me look at the
AnsiLogFormatterwhich is the formatter used by the handlers.Assistant
Now let me look at the base
LogFormatterclass.Assistant
I can now see the root cause. Let me examine the
AnsiCodeclass since the message is processed through it before formatting, which could interact withMessageFormat.Assistant
Now I clearly understand the root cause. Let me look at the existing tests for these formatters and check how
MessageFormatis used in the codebase.Assistant
Let me create a reproduction test to confirm the issue before fixing it.
Assistant
Now let me find the compiled classes / classpath to compile and run the reproduction.
Assistant
No compiled classes yet. Let me check if there's a built target directory anywhere, and check the Java version and maven setup.
Assistant
I'll build the engine module to compile the classes for my reproduction test.
Assistant
The mvnw script has an issue with
HOMEnot being set in the sh environment. Let me try setting HOME and using mvn directly if available.Assistant
The engine compiled in offline mode. Now let me compile and run my reproduction test against the compiled classes.
Assistant
I've confirmed the bug — both
AnsiLogFormatterandLogFormatterleave the{0}and{1}placeholders literal. The root cause is that they useString.format(viamessage.formatted(additionalArgs)), which doesn't handleMessageFormat-style{0}placeholders that gRPC uses.Let me implement the fix. I'll add a shared helper method in the base
LogFormatterclass that detectsMessageFormat-style placeholders and delegates toMessageFormat.format, mirroringjava.util.logging.Formatter#formatMessage.Assistant
Now let me open the file and make the edits. First, add the
Patternimport and the helper field/method inLogFormatter.Assistant
Now let me make the edits. First, add the
Patternimport:Assistant
Now let me add the helper method field and method, and update the FORMAT THE MESSAGE block in
LogFormatter:Assistant
Now let me replace the FORMAT THE MESSAGE block with a call to the new helper, and add the helper method:
Assistant
Now let me update
AnsiLogFormatter.javato use the same helper method.Assistant
Both formatters now use the shared helper. Let me recompile and re-run the reproduction test to confirm the fix.
Assistant
The fix works. Now let me test edge cases to ensure I didn't break the existing
%s/%dstyle formatting and other scenarios.Assistant
All edge cases pass. The apostrophe case (
can't {0}→cant {0}) is the standardMessageFormatquoting behavior, identical to the JDK'sFormatter.formatMessage— so this is consistent with standard JUL.Now let me run the existing
LoggerTestto make sure I didn't break anything.Assistant
The surefire JUnit platform provider isn't cached. Let me try running with online mode to fetch the missing test dependency.
Assistant
The tests ran. Let me check the surefire report to confirm the result.
Assistant
All 4 LoggerTest tests pass. Let me also check for any other places in the codebase that format LogRecord messages, to be thorough about the fix's scope.
Assistant
Let me verify there are no other custom
Formattersubclasses in the codebase that might have the same issue.Assistant
The only JUL
Formattersubclasses areLogFormatterandAnsiLogFormatter, both now fixed. Let me confirm the log configuration actually uses these formatters (verifying the issue's described path).Assistant
This confirms the configuration matches the issue exactly:
ConsoleHandler→AnsiLogFormatter(the kubectl logs path showingWARNI [ManagedChannelImpl])FileHandler→LogFormatter
Both are the formatters I've fixed. The
ManagedChannelImplJUL records flow directly to these handlers. Let me clean up the temp repro files and review the final diff.Assistant
The diff is clean and minimal. Let me do a final compile check to confirm the saved state compiles cleanly, then run the LoggerTest once more.
Assistant
All tests pass. Let me verify my understanding of the logging backend by confirming ArcadeDB uses JUL natively (not SLF4J/Logback as the issue reporter suspected), so the formatter-level fix is the correct approach.
Assistant
Confirmed: ArcadeDB uses JUL natively with the custom
AnsiLogFormatter/LogFormatterformatters — there is no SLF4J/Logback backend orSLF4JBridgeHandler. The issue reporter's "suspected root cause" (SLF4J bridge) was a misdiagnosis of the implementation, but the symptom is real. The actual root cause is that the formatters useString.format(viamessage.formatted(...)), which doesn't handleMessageFormat-style{0}placeholders that gRPC'sManagedChannelImplemits via JUL.My fix is the correct, minimal solution at the right place. Let me do a final review of both edited files.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.