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
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 start by exploring the repository structure to understand the codebase and locate the logging-related components.
Assistant
This is a Java/Maven project. The issue is about gRPC logging where JUL (java.util.logging) messages with MessageFormat placeholders ({0}, {1}) are not being properly converted when bridged to SLF4J. Let me look for logging-related files, particularly any JUL to SLF4J bridge handlers.
Assistant
Let me search for any existing JUL bridge handler or configuration in the server module:
Assistant
Let me look for the server main class and logging configuration.
Assistant
I need to find the main server class and any logging initialization. Let me search for the ArcadeDB server main class.
Assistant
I can see a
ServerLogManagerclass being used. Let me look at that class:Assistant
Now let me look at the DefaultLogger which seems to be the main logger implementation:
Assistant
Now I understand the architecture. The
DefaultLoggerusesjava.util.logging(JUL) internally. The issue is that gRPC also uses JUL, but when gRPC logs messages with parameters (using MessageFormat-style{0},{1}placeholders), those parameters are stored in theLogRecord.parametersarray. However, when ArcadeDB's logging system receives these JUL log records, it's not processing the parameters correctly.Let me look for where the bridge between JUL and ArcadeDB's logging might be happening:
Assistant
Now let me search for how JUL handlers are configured in the project. The issue is about gRPC's JUL messages not having their parameters formatted. Let me look for any custom JUL Handler:
Assistant
The issue is about gRPC's JUL (java.util.logging) log messages not having their parameters formatted. The key insight from the issue is:
- gRPC uses JUL with MessageFormat-style placeholders ({0}, {1})
- The ArcadeDB server log shows these placeholders unsubstituted
- The parameters are stored in LogRecord.parameters array
- The fix should ensure that when JUL LogRecords are processed, their parameters are formatted using MessageFormat
Looking at the code, I see that ArcadeDB uses JUL internally. The
DefaultLoggerclass logs to JUL. But the issue is that when other JUL loggers (like gRPC) log messages with parameters, those parameters aren't being formatted.The issue is in the JUL Handler (like ConsoleHandler or FileHandler) that processes these log records. The formatter needs to check if the LogRecord has parameters and format them.
Let me look at the LogFormatter class:
Assistant
Let me continue looking at the LogFormatter class to understand how it formats log records.
Assistant
Now I found the issue! In
LogFormatter.customFormatMessage(), the code usesmessage.formatted(additionalArgs)which usesString.format()style (with%s,%d, etc.), but gRPC uses MessageFormat style with{0},{1}, etc.The
String.formatted()method usesFormatterpattern syntax (%s,%d, etc.), notMessageFormatpattern syntax ({0},{1}). When gRPC logs with MessageFormat placeholders and the parameters are in the LogRecord's parameters array, theString.formatted()call will fail to substitute them and either throw an exception (caught and ignored) or leave the placeholders as-is.Let me verify by checking how gRPC logs:
Assistant
Looking at the issue, the problem is in
LogFormatter.customFormatMessage(). It usesmessage.formatted(additionalArgs)which isString.format()style (using%s,%d, etc.), but gRPC usesMessageFormatstyle with{0},{1}, etc.When gRPC logs a message with MessageFormat placeholders, the
String.formatted()method can't substitute{0},{1}and either throws anIllegalFormatException(which is caught and the raw message is used) or leaves the placeholders literal.Let me also check the AnsiLogFormatter to see if it has the same issue:
Assistant
Now I understand the issue! Both
LogFormatterandAnsiLogFormatterusemessage.formatted(additionalArgs)which usesString.format()style placeholders (%s,%d, etc.), but gRPC usesMessageFormatstyle placeholders ({0},{1}, etc.).When gRPC logs a message like
"[{0}] Failed to resolve name. status={1}"with parameters["channel-7", "UNAVAILABLE: ..."], theString.formatted()method can't substitute these{0},{1}placeholders because they're not validString.format()patterns.Let me first create a test to reproduce this issue:
Assistant
I've confirmed the issue. When
String.formatted()is used with MessageFormat-style placeholders ({0},{1}), it doesn't substitute them and just returns the original message with placeholders intact. This is exactly what the issue describes.Now let me look at how the codebase currently handles this and implement a fix. The fix should be in both
LogFormatterandAnsiLogFormatterto properly handle MessageFormat-style placeholders.Assistant
Now I understand the issue. The
LogFormatterandAnsiLogFormatterclasses usemessage.formatted()which expects%s-style format specifiers, but gRPC uses{0}-style MessageFormat placeholders. I need to fix both formatters to handle MessageFormat-style placeholders.Let me fix the
LogFormatterclass first:Assistant
The user seems to have encountered an error with the tool call. Let me try again with the correct syntax for opening a file.
Assistant
Now I understand the issue clearly. The
LogFormatter.customFormatMessage()method usesmessage.formatted(additionalArgs)which expects%s-style format specifiers, but gRPC uses{0}-style MessageFormat placeholders. I need to modify bothLogFormatterandAnsiLogFormatterto handle MessageFormat-style placeholders properly.Let me create the fix:
Assistant
Let me try using the heredoc syntax for the edit command:
Assistant
Let me try using sed to make the changes:
Assistant
OK, I was in the middle of fixing the LogFormatter.java file. Let me continue with the fix using a different approach since python3 is not available. I'll use a here-document with cat to create the fixed file.
Assistant
I've successfully updated the LogFormatter.java file. Now I need to update the AnsiLogFormatter.java file with the same fix. Let me also verify the changes to LogFormatter.java were applied correctly.
Assistant
Let me verify the changes I made to both files are correct by viewing them.
Assistant
Good, the LogFormatter.java file has been updated correctly. Now let me verify the AnsiLogFormatter.java file as well.
Assistant
Now let me create a test script to verify that the fix works correctly. I need to:
- Test that MessageFormat-style placeholders ({0}, {1}) are properly formatted
- Test that Formatter-style placeholders (%s, %d) still work
- Test edge cases like missing parameters, mismatched placeholders, etc.
Let me create a test to verify the fix.
Assistant
Let me fix the missing imports in the test file.
Assistant
I need to add the import for IllegalFormatException. It's in the java.util.format package.
Assistant
The issue is that IllegalFormatException is a subclass of IllegalArgumentException, so the outer catch block already catches it. I need to restructure the catch blocks. Let me fix this.
Assistant
The test passed! However, I realize I need to simplify the fix in the actual source files to avoid the nested try-catch complexity. Let me update the LogFormatter.java and AnsiLogFormatter.java files with a cleaner implementation.
Assistant
I successfully updated the LogFormatter.java file. Now I need to update the AnsiLogFormatter.java file with the same fix.
Assistant
Now let me verify both files are correctly updated and then compile and test them.
Assistant
The code compiles successfully. Now let me run the existing tests to make sure I haven't broken anything.
Assistant
The tests passed! Now let me create a more comprehensive test to verify the fix works correctly for the gRPC case described in the issue.
Assistant
Excellent! The fix is working correctly. Now let me verify that the existing tests still pass and check if there are any other places in the codebase that might need similar fixes.
Assistant
Let me check if there are any other places in the codebase that might need similar fixes:
Assistant
Let me verify the changes I made are correct and complete by running a broader set of tests to ensure nothing is broken.
Assistant
Let me verify the fix is working correctly by reviewing the changes I made and running a quick test to confirm the changes compile and the tests pass.
Assistant
Let me check the changes I made to both files and make sure everything is correct before submitting. Let me also check the diff for AnsiLogFormatter.java.
Assistant
I see that I added an unnecessary
import java.text.MessageFormat;toAnsiLogFormatter.javasince it's now using the inheritedformatMessage()method from the parent class. Let me fix that.Assistant
Let me continue verifying the fix and run the tests to make sure everything is working correctly.
Assistant
The diff looks clean now. The
AnsiLogFormatternow uses theformatMessage()method inherited fromLogFormatter, which handles both MessageFormat-style and Formatter-style placeholders.Let me compile and run the tests to verify everything is working correctly.
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
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
- xiaomi/mimo-v2.5-proCompare side by side →
- xiaomi/mimo-v2.5-proCompare side by side →
- xiaomi/mimo-v2.5-proCompare side by side →
- xiaomi/mimo-v2.5-proCompare side by side →
- xiaomi/mimo-v2.5-proCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →