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
Let me start by exploring the repository structure to understand the codebase and find the relevant logging bridge code.
Assistant
There's a
com.arcadedb.log.LogManagerclass. The issue is about a bridge between JUL (java.util.logging) and SLF4J/Logback. TheServerLogManagerextendsjava.util.logging.LogManager. Let me understand how logging works. Let me look at how gRPC logs get routed. Let me search for how the JUL logging is bridged.Assistant
Now I understand the logging architecture. ArcadeDB uses JUL (java.util.logging) directly with a custom formatter (
AnsiLogFormatter). The issue is about gRPC'sManagedChannelImplwhich uses JUL withMessageFormat-style placeholders ({0},{1}).The ArcadeDB's own logger (
DefaultLogger.log) formats messages usingString.formatted()(which uses%sstyle), but gRPC uses JUL directly, bypassing theDefaultLogger.logmethod. So gRPC callsLogger.log(Level, String, Object...)directly on JUL loggers, and theLogRecordcarries parameters. TheAnsiLogFormatterthen needs to format those parameters.Let me look at the
AnsiLogFormatterto see how it handlesLogRecordparameters.Assistant
Found the issue. The
AnsiLogFormatter.customFormatMessageusesmessage.formatted(additionalArgs)which usesString.formatstyle (%s,%d), but gRPC usesMessageFormatstyle placeholders ({0},{1}). Somessage.formatted(additionalArgs)doesn't substitute{0}and{1}— it leaves them literal.Let me look at the
LogFormatterbase class too.Assistant
Now I understand the issue. Both formatters use
message.formatted(additionalArgs)(i.e.String.formatwith%sstyle). But gRPC (and JUL in general) usesMessageFormatstyle placeholders{0},{1}. ArcadeDB's ownDefaultLogger.logpre-formats%smessages before calling JUL (so they reach the formatter with no parameters), but third-party JUL loggers like gRPC pass{0}-style messages with parameters directly to JUL.Let me check the existing tests for the formatter.
Assistant
Let me write a reproduction script to confirm the issue, and also search for any direct JUL logging with parameters in the codebase.
Assistant
These are all
logger.logLinecalls (a different progress-bar logger), not JUL. ArcadeDB's own JUL logging goes throughcom.arcadedb.log.LogManager.instance().log(...)which pre-formats withString.formatbefore calling JULlog.log(level, msg)with no parameters. So the only place where parameters reach the formatter is third-party JUL loggers (gRPC, Ratis) which use MessageFormat{0}style.Let me write a reproduction test to confirm the bug.
Assistant
Let me try to build the engine module to get compiled classes for a reproduction test.
Assistant
Now let me write a reproduction test using the actual formatter classes.
Assistant
I've confirmed the bug. The
{0}and{1}placeholders are left literal in both formatters. Let me examineAnsiCode.formatto ensure my fix won't conflict with it.Assistant
AnsiCode.formatonly processes$ANSI{...}patterns (with the$ANSI{prefix), so{0}and{1}are not touched. Good.Let me check the direct JUL usages in
ServerMonitorandFileManagerto make sure they don't log printf-style with parameters.Assistant
ServerMonitor.LOGER.log(Level.FINE, "message", e)uses the throwable overload, not params. So ArcadeDB's own code never logs printf-style messages WITH params directly to JUL. The formatter's params path is only hit by third-party JUL loggers using MessageFormat{0}.Let me search the tests for any usage that relies on printf-style substitution at the formatter level.
Assistant
No tests directly test the formatter's params substitution with printf style, and ArcadeDB always pre-formats its own messages before JUL. The formatter's params path is only hit by third-party JUL loggers (gRPC, Ratis) using MessageFormat
{0}style.Now let me implement the fix. I'll add a shared helper method in
LogFormatterthat handles both MessageFormat ({0}) and printf (%s) style parameter substitution, and use it in both formatters.Assistant
Let me view the relevant sections of both files with line numbers.
Assistant
Now let me look at the imports of LogFormatter to confirm
java.text.*is imported (for MessageFormat).Assistant
java.text.*is imported, soMessageFormatis available. Now let me implement the fix inLogFormatter.java. First, I'll replace the "FORMAT THE MESSAGE" block to use a new helper method.Assistant
There's a leftover duplicate at lines 152-153 from the original code. Let me remove it.
Assistant
There's a duplicate method declaration. Let me view and fix precisely.
Assistant
LogFormatter.javalooks good now. Let me updateAnsiLogFormatter.javato use the same helper method.Assistant
Now let me replace the "FORMAT THE MESSAGE" block in
AnsiLogFormatter.javato use the inherited helper.Assistant
There's a duplicate return statement. Let me fix that.
Assistant
Both files look good now. Let me recompile the engine module and re-run the reproduction test.
Assistant
The fix works perfectly:
- gRPC's
[{0}] Failed to resolve name. status={1}now substitutes to[channel-7] Failed to resolve name. status=UNAVAILABLE:...in both formatters. - Printf-style with params still works.
- No-params messages work.
- MessageFormat with format types (
{1,number,percent}→85%) works. - Invalid MessageFormat falls back gracefully without throwing.
Now let me run the existing logging tests to make sure nothing breaks.
- gRPC's
Assistant
The surefire plugin isn't cached offline. Let me try with network access.
Assistant
The test ran without errors. Let me confirm by checking the surefire reports.
Assistant
All 4 LoggerTest tests pass. Let me also check whether any other tests directly use the formatters or verify log output content.
Assistant
Only
LoggerTestreferences the formatters, and it passes. Let me verify there's no separate SLF4J/Logback bridge path that the issue might be referring to (the issue mentions "SLF4J/Logback backend").Assistant
The server uses
slf4j-jdk14(SLF4J→JUL binding), so all logging ultimately flows through JUL handlers configured with ArcadeDB'sAnsiLogFormatter/LogFormatter. gRPC uses JUL directly with MessageFormat{0}placeholders + parameters, which is exactly the path my fix addresses. Let me verify the configured handlers/formatters in the log properties.Assistant
Confirmed — the production config uses
com.arcadedb.utility.AnsiLogFormatteras the ConsoleHandler formatter, so all JUL records (including gRPC'sManagedChannelImpl) flow through the formatter I fixed.Let me do a final review of the complete
LogFormatter.javato ensure correctness.Assistant
The code looks correct. Let me clean up temp files and check the gRPC module for any related logging paths mentioned in the issue (GrpcLogAppender / AppendLogResponseHandler).
Assistant
No
AppendLogResponseHandler/GrpcLogAppenderin the codebase — those are gRPC's internal paths. My fix in the ArcadeDB formatter is the correct location. Let me review the full diff.Assistant
The diff is clean. Let me check if there are any other custom formatters in the codebase that might need the same fix.
Assistant
LogFormatteris the only custom JULFormatter(withAnsiLogFormatterextending it), so my fix covers all custom formatters. Let me run a final verification: compile engine tests and run LoggerTest once more.Assistant
All tests pass. The fix is complete and verified.
Summary
Root Cause
The issue was in ArcadeDB's custom JUL
Formatterimplementations (LogFormatterandAnsiLogFormatter). These formatters are installed on the JULConsoleHandler(perarcadedb-log.properties) and are the final formatting step for all JUL log records — including gRPC'sManagedChannelImpl, which logs directly againstjava.util.loggingusingMessageFormat-style placeholders ({0},{1}) plus a parameter array.The formatters substituted parameters using only
message.formatted(additionalArgs)(i.e.String.format/ printf%sstyle). Since gRPC's templates contain no%specifiers,String.formatleft the{0}/{1}tokens literal — and because noIllegalFormatExceptionwas thrown, the raw template was emitted unchanged.ArcadeDB's own log calls were unaffected because
DefaultLogger.logpre-formats%smessages before handing them to JUL (so they arrive at the formatter with no parameters).Fix
Added a shared helper
formatMessageWithParameters(message, parameters)inLogFormatter(inherited byAnsiLogFormatter) that:- Returns the message as-is when there are no parameters (preserving existing behavior for ArcadeDB's pre-formatted messages).
- When parameters are present and the message contains a
{n}placeholder, appliesMessageFormat.format(...)— the standard JUL convention used by gRPC/Ratis. - Otherwise falls back to printf-style
String.formatted(...)(preserving compatibility with any printf-style-with-params loggers). - Catches
IllegalArgumentException/IndexOutOfBoundsException/IllegalFormatExceptionand falls back to the raw template, so logging never throws.
The
{n}detection (hasMessageFormatPlaceholder) also respects MessageFormat single-quote quoting, avoiding false positives.Checklist
- Reproduced the error: Yes — a reproduction script confirmed
[{0}] Failed to resolve name. status={1}was emitted literally by both formatters before the fix. - Confirmed the fix resolves the error: Yes — after the fix the same record renders as
[channel-7] Failed to resolve name. status=UNAVAILABLE: .... - Edge cases handled: Yes — verified MessageFormat
{0}/{1}, format types ({1,number,percent}→85%), printf-style with params, no-params, invalid MessageFormat (graceful fallback), and single-quote quoting. - Existing tests run: Yes —
LoggerTest(4 tests, the only test referencing the formatters) passes; engine test-compile succeeds.
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 →
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 →