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 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 analyze the issue. The problem is that gRPC's ManagedChannelImpl log messages contain unsubstituted placeholders ({0}, {1}) instead of actual values. This is because gRPC uses java.util.logging (JUL) with MessageFormat-style placeholders, but the bridge to SLF4J/Logback is not translating these parameters properly.
Let me first explore the repository structure to understand the codebase and find the relevant logging bridge code.
Assistant
Let me search for the logging bridge and any existing LogRecord handling.
Assistant
Now let me look at the LogFormatter to understand the formatting process:
Assistant
I can see the issue. The
LogFormatterusesmessage.formatted(additionalArgs)which expects Java'sString.format()style placeholders (%s,%d, etc.), but gRPC's JUL log records useMessageFormatstyle placeholders ({0},{1}, etc.). TheLogRecord.getParameters()array contains the values, but they're being formatted incorrectly.Let me also check the
AnsiLogFormatter:Assistant
Now I understand the issue. Both
LogFormatterandAnsiLogFormatterusemessage.formatted(additionalArgs)which expects Java'sString.format()style (%s,%d), but gRPC's JUL loggers useMessageFormatstyle placeholders ({0},{1}). TheIllegalFormatExceptionis caught and the raw message with placeholders is output.Let me check if there are any tests for these formatters:
Assistant
Now I understand the full picture. The issue is that the
LogFormatterandAnsiLogFormatterclasses usemessage.formatted(additionalArgs)which uses Java'sString.format()style placeholders. However, gRPC's JUL loggers useMessageFormatstyle placeholders ({0},{1}). When theIllegalFormatExceptionis caught, the raw message is output without substituting the parameters.The fix should detect MessageFormat-style placeholders (containing
{followed by digits) and useMessageFormat.format()instead ofString.format().Let me explore the repository structure a bit more to confirm my understanding:
Assistant
Let me understand the fix better. I need to modify the
LogFormatter.customFormatMessage()method to detect MessageFormat-style placeholders and useMessageFormat.format()when appropriate. Let me first create a test script to reproduce the issue:Assistant
Let me run the test to confirm the issue exists:
Assistant
I've confirmed the issue. The test shows:
- Test 1 (MessageFormat-style
{0},{1}) - FAILS - placeholders are not substituted - Test 2 (printf-style
%s,%d) - PASSES - placeholders are substituted correctly - Test 3 (no parameters) - PASSES
Now I need to fix the
LogFormatterto handle MessageFormat-style placeholders. The fix should:- Detect if the message contains MessageFormat-style placeholders (like
{0},{1}) - If so, use
MessageFormat.format()instead ofString.format() - Otherwise, use the existing
String.format()behavior
Let me implement the fix:
- Test 1 (MessageFormat-style
Assistant
The open command needs to be in bash format. Let me use the correct syntax.
Assistant
Now I'll modify the
customFormatMessagemethod to handle both MessageFormat-style and printf-style placeholders. The key change is in the message formatting section:Assistant
I need to provide the line range correctly as start:end format.
Assistant
The edit didn't work correctly - it replaced the wrong lines and left the file in a broken state. Let me revert and try again:
Assistant
Let me view the file again and use a more precise approach:
Assistant
Now I can see the exact line numbers. I need to:
- Replace lines 86-94 (the message formatting section) with the new code that handles both formats
- Add the
isMessageFormatStylehelper method before the closing brace
Let me use
replacefor a more precise change:Assistant
Now I need to add the
isMessageFormatStylehelper method. I'll add it before the closing brace of the class:Assistant
The file was updated successfully. Now I need to:
- Also update the
AnsiLogFormatterclass which has the same issue - Compile and test the changes
Let me first check the AnsiLogFormatter to apply the same fix there.
- Also update the
Assistant
I see that
AnsiLogFormatterextendsLogFormatterbut overridescustomFormatMessagewith its own implementation that has the same issue. I need to:- Change the helper methods from
privatetoprotectedinLogFormatterso they can be reused - Update
AnsiLogFormatterto use the same pattern - Add the
MessageFormatimport toAnsiLogFormatter
- Change the helper methods from
Assistant
Now I need to update
AnsiLogFormatterto use the same pattern and add theMessageFormatimport.Assistant
Now I need to update the message formatting section in
AnsiLogFormatter:Assistant
Now let me compile the engine module to verify the changes compile correctly:
Assistant
The code compiles. Now let me run the test again to verify the fix works:
Assistant
All tests pass now. Let me also test the
AnsiLogFormatterto make sure it works correctly too:Assistant
Let me continue by compiling and running the AnsiLogFormatter test to verify the fix works for both formatters.
Assistant
Both formatters work correctly now. Let me test some edge cases to make sure the fix handles them properly:
Assistant
Edge case 2 failed because my
isMessageFormatPlaceholdermethod doesn't handle the subformat specifiers (likedate,yyyy-MM-dd) properly. Let me fix this:Assistant
The issue is that my
isMessageFormatPlaceholdermethod is too strict - it's checking for specific characters but MessageFormat format specifiers can contain arbitrary characters likeyyyy-MM-dd. I need to simplify it to just look for the closing brace after confirming the opening is{digit....Let me use the edit command with line numbers to replace the method.
Assistant
Let me recompile and run the edge case tests again to verify the fix works properly.
Assistant
All edge case tests pass now. Let me also run the original tests again to make sure everything still works.
Assistant
I've successfully fixed the issue and all tests pass. Let me now run the existing unit tests in the repository to make sure I haven't broken anything, then clean up the temporary test files and submit.
Assistant
Let me verify the test results more clearly and clean up the temporary files before submitting.
Assistant
The user is asking me to do something, but there's no new message. They just show the current state. I should continue with the task - I've already fixed the issue and verified it works. Now I should clean up the temporary test files and submit my changes.
Let me clean up and submit.
Assistant
The user didn't send any new message. Let me continue with the task. I've already:
- Fixed the issue in both
LogFormatter.javaandAnsiLogFormatter.java - Verified the fix works with multiple test cases
- Ran existing tests (LoggerTest) - all 4 tests pass
- Cleaned up temporary test files
Now I should submit my changes. Let me first review what I've changed with git diff.
- Fixed the issue in both
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.