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
Let me explore the repository structure to understand how logging is set up and find the JUL-to-SLF4J bridge.
Assistant
Let me search for the JUL to SLF4J bridge handler in the codebase.
Assistant
Let me search more specifically for the logging bridge handler.
Assistant
Let me search more carefully.
Assistant
Let me look at the LogFormatter and DefaultLogger classes which are the core logging components.
Assistant
Now I can see the issue. The
customFormatMessagemethod usesmessage.formatted(additionalArgs)which usesprintf-style (%s) formatting, but gRPC's JUL loggers useMessageFormat-style placeholders ({0},{1}). Let me look at the DefaultLogger too.Assistant
Let me look at the
AnsiLogFormatterclass.Assistant
Let me check the
AnsiCodeclass to understand the ANSI formatting and ensure my fix won't conflict.Assistant
Let me look at the existing logger tests to understand expected behavior.
Assistant
Now I understand the issue. The
LogFormatter.customFormatMessageandAnsiLogFormatter.customFormatMessageboth useString.formatted()(printf%sstyle), but gRPC's JUL loggers useMessageFormat-style placeholders ({0},{1}). Standard JULFormatter.formatMessagedetects this and usesMessageFormat.format. Let me write a reproduction test first to confirm.Assistant
Let me find how to compile and run against the engine module.
Assistant
Let me build the engine module first.
Assistant
Confirmed the bug —
{0}and{1}remain literal. Now let me implement the fix. First, I'll add a helper method inLogFormatter.Assistant
java.text.*is already imported, which includesMessageFormat. Now let me add the helper method and update thecustomFormatMessageinLogFormatter. Let me open the file.Assistant
Now let me make the edits. First, I'll replace the message formatting block in
LogFormatterwith a call to a new helper method.Assistant
No python. Let me use the editor tools instead. Let me open the file.
Assistant
The replace tool needs the exact displayed lines. Let me use the
editcommand with line ranges instead. Let me view the end of the file.Assistant
LogFormatterupdated. Now let me updateAnsiLogFormatterto use the same helper method.Assistant
There's a subtle issue with
AnsiLogFormatter. The message isAnsiCode.format(iRecord.getMessage())— if colors are supported, this resolves$ANSI{...}to ANSI escape codes. But for gRPC messages without$ANSI{, this is a no-op. ThenformatLogMessagewould handle MessageFormat.But wait — there's a subtlety: in
AnsiLogFormatter, the message is already ANSI-formatted, so if it contains actual ANSI escape codes with{... no, ANSI escape codes use\u001B[not{. So safe.But there's a more important subtlety: The
formatLogMessageusesMessageFormat.format(message, additionalArgs). If the message contains$ANSI{...}that wasn't resolved... but it IS resolved byAnsiCode.formatbefore. So fine.Actually wait, there's one concern:
MessageFormat.formattreats{and}as special. If the message has a literal{that's not a valid placeholder (e.g., a JSON snippet), MessageFormat would throw IllegalArgumentException, which we catch and return the message as-is. So that's safe — falls back gracefully.Assistant
There's a duplicate
returnline. Let me fix it.Assistant
There's an extra
}at line 82. Let me remove it.Assistant
Now let me recompile and rerun the reproduction test.
Assistant
The fix works — placeholders are now substituted. Let me run the existing logger tests to ensure nothing breaks.
Assistant
The test output is truncated. Let me check the result more explicitly. Let me run with the surefire report or check exit code.
Assistant
All 4 LoggerTest tests pass. Let me extend my reproduction test to verify edge cases (printf-style still works, literal braces don't break, empty params).
Assistant
Let me check whether any tests or code exercise the formatters with printf-style parameters, to ensure my change is safe.
Assistant
No tests directly test the formatters with printf-style params. Let me check tests that capture log records and might assert on message content.
Assistant
These capturing handlers read
record.getMessage()directly, not through the formatter, so they're unaffected. My change only affects the formatter output. Let me run a couple of relevant tests that use capturing handlers to be safe.Assistant
The exact format match (
WARNI5-char truncation,[ManagedChannelImpl]prefix) confirms the ArcadeDB JUL formatters are producing these lines. Let me verify there isn't a separate SLF4J/Logback backend that also needs fixing.Assistant
The server uses
slf4j-jdk14(SLF4J → JUL binding), confirming JUL with the ArcadeDB formatters is the actual backend — not Logback. gRPC logs via JUL directly, so my fix in the formatters is the correct and complete fix. Let me review the final diff.Assistant
Let me check the log properties to confirm the configured handlers use these formatters.
Assistant
Confirmed — production uses
ConsoleHandlerwithAnsiLogFormatter, exactly the path I fixed. Let me clean up the temporary test files and do a final compile check.Assistant
Let me do one final end-to-end verification with a fresh reproduction to confirm the fix works on the final compiled code.
Assistant
The fix is verified. Let me provide my final summary and the checklist.
Summary
Root cause: ArcadeDB's server logging backend is
java.util.logging(JUL) — the server usesslf4j-jdk14which routes SLF4J to JUL, and production config () installs on the . gRPC's logs via JUL directly using -style placeholders (, ). However, both and substituted parameters using (printf / style), which does not understand /. With no specifiers present, the args were silently dropped and the raw template () was written to the log.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.