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 analyze the issue. The problem is that gRPC's ManagedChannelImpl log messages contain unsubstituted placeholders ({0}, {1}) instead of actual values. This is happening because the bridge between java.util.logging (JUL) and SLF4J is not properly translating the placeholders.
Let me first explore the repository structure to understand how the logging is configured.
Assistant
Let me explore the repository structure to find logging-related code.
<tool_call> <function=bash_terminal> <parameter=command> ls -la /arcadedb/ </tool_call>
Assistant
The user wants me to explore the repository structure. I need to use the bash_terminal tool to list the contents of the /arcadedb directory.
Assistant
Let me search for logging-related files, particularly JUL/SLF4J bridge code.
Assistant
Let me look at the logging configuration files and the grpc-related code.
<tool_call> <function=bash_terminal> <parameter=command> cat /arcadedb/package/src/main/config/arcadedb-log.properties </tool_call>
Assistant
I need to use the bash_terminal tool to view the logging configuration file.
Assistant
I see the logging configuration. Let me also look at the other log properties file and the custom formatters mentioned.
Assistant
Now let me find the LogFormatter and AnsiLogFormatter classes:
Assistant
The user wants me to continue investigating the issue. Let me look at the LogFormatter.java and AnsiLogFormatter.java files to understand how they handle log messages.
Assistant
I found the issue! The
LogFormatter.javausesmessage.formatted(additionalArgs)which expects%sstyle format specifiers (Java'sString.formatted()method), but gRPC uses{0},{1}style placeholders (MessageFormat-style). Let me also check the AnsiLogFormatter:Assistant
Now I understand the issue. Both
LogFormatter.javaandAnsiLogFormatter.javauseString.formatted(additionalArgs)which expects Java-style%sformat specifiers. However, gRPC usesjava.text.MessageFormat-style placeholders ({0},{1}), which are not being properly substituted.Let me check the Java version being used:
Assistant
Now I understand the root cause. Both formatters use
message.formatted(additionalArgs)which expects SLF4J-style{}or printf-style%splaceholders. But gRPC uses MessageFormat-style{0},{1}placeholders which are NOT being substituted.Let me also check if there are any tests related to the LogFormatter:
Assistant
I found the files that use LogFormatter. Let me look at the DefaultLogger.java and LoggerTest.java to understand how logging works.
Assistant
Now I have a clear understanding of the issue. Let me look at the test file to understand the test structure:
Assistant
Now I have a clear understanding of the issue. Let me create a test script to reproduce the problem first.
Assistant
Let me compile and run this reproduction script to confirm the issue:
Assistant
The user wants me to continue investigating the issue. Let me check if the maven wrapper is available to compile and run the reproduction test.
Assistant
Let me create a simpler standalone test to confirm the bug:
Assistant
The user wants me to continue investigating the issue. Let me compile and run the reproduction script to confirm the bug.
Assistant
The bug is confirmed. The issue is that
String.formatted()doesn't handle MessageFormat-style{0},{1}placeholders that gRPC uses. Let me understand the code better and create a fix.Assistant
Now I have a clear understanding of the issue. Let me verify this is indeed the root cause by examining how gRPC uses logging. Let me check the pom.xml for gRPC dependencies:
Assistant
Now I have a clear understanding of the issue. The
LogFormatter.javaandAnsiLogFormatter.javauseString.formatted()which expects%s-style format specifiers, but gRPC uses MessageFormat-style{0},{1}placeholders. Let me implement the fix.Assistant
I need to open the LogFormatter.java file and navigate to understand the code structure before making changes.
Assistant
I need to read the LogFormatter.java file first before making changes. Let me open it properly.
Assistant
Now I understand the issue clearly. The problem is that
LogFormatter.javaandAnsiLogFormatter.javauseString.formatted(additionalArgs)which expects%s-style format specifiers (Java printf style), but gRPC uses MessageFormat-style{0},{1}placeholders.I need to create a helper method that can handle both MessageFormat-style (
{0},{1}) and printf-style (%s,%d) placeholders. Let me implement the fix:Assistant
Let me read the file again and then make the necessary edits properly.
Assistant
Now I understand the structure. Let me read the AnsiLogFormatter.java too:
Assistant
Now I understand the issue. The
LogFormatter.javaandAnsiLogFormatter.javauseString.formatted(additionalArgs)which expects%s-style format specifiers (Java printf style), but gRPC uses MessageFormat-style{0},{1}placeholders.The best approach is to create a helper method that tries both formatting styles:
- First try
MessageFormat.format()for{0},{1}style (used by gRPC) - If that fails, fall back to
String.formatted()for%sstyle (used by ArcadeDB internally)
Let me implement the fix:
- First try
Assistant
The user wants me to replace the LogFormatter.java file with the fixed version. Let me use the bash terminal to copy the file to the correct location.
Assistant
Now let me verify the LogFormatter.java was updated correctly:
Assistant
Good, the LogFormatter.java is updated. Now I need to update the AnsiLogFormatter.java similarly. Let me create the fixed version:
Assistant
I need to copy the AnsiLogFormatter.java fix to the correct location.
Assistant
Let me verify the AnsiLogFormatter.java was updated correctly:
Assistant
The user wants me to continue working on the issue. I've updated both LogFormatter.java and AnsiLogFormatter.java to fix the issue with unsubstituted gRPC placeholders. Now I need to:
- Create a test to verify the fix works
- Check if there are any other places in the codebase that also use
String.formatted()for log messages that might have the same issue
Let me first search for other places that might have the same issue:
Assistant
I see that DefaultLogger.java also uses
String.formatted()for formatting messages. Let me look at it more carefully:Assistant
Let me look at the DefaultLogger.java in more detail to understand the context:
Assistant
I see the issue now. The DefaultLogger.java also uses
String.formatted()for formatting messages before passing them to JUL. I need to update DefaultLogger.java as well to handle both MessageFormat-style and printf-style placeholders. Let me read the full file:Assistant
Let me read the full DefaultLogger.java to understand its structure before making changes:
Assistant
I need to update DefaultLogger.java to use the new
formatMessage()method from LogFormatter. Let me create the updated version:Assistant
The user wants me to copy the DefaultLogger.java fix to the correct location. Let me do that now.
Assistant
Now let me verify the changes and create a test to confirm the fix works:
Assistant
Let me verify all changes are in place and create a test to confirm the fix works:
Assistant
Let me compile and run the test to verify the fix works:
Assistant
Let me fix the test file by adding the missing imports:
Assistant
Let me fix the import -
MissingResourceExceptionis injava.utilnotjava.text:Assistant
I see the issue. The
MessageFormat.format()doesn't throw an exception for printf-style messages - it just returns them unchanged. I need to detect if the message was actually formatted. Let me fix theformatMessage()method:Assistant
I need to fix the formatMessage method. The issue is that MessageFormat.format() doesn't throw an exception for printf-style messages - it just returns them unchanged. I need to detect if the message was actually formatted by checking if the output differs from the input.
Assistant
Now let me update the test to verify the fix:
Assistant
Good progress! Most tests pass. The SLF4J-style {} placeholder test fails because Java's
String.formatted()doesn't support SLF4J-style{}placeholders (it uses printf-style%s). However, this was not supported in the original code either, so it's not a regression. The main issue (gRPC's{0},{1}placeholders) is now fixed.Let me update the test to remove the SLF4J-style test and verify everything works:
Assistant
All tests pass. Now let me clean up the test files and verify the final state of the changed files:
Assistant
The user wants me to verify the changes. Let me check the git diff to see all the changes made:
Assistant
The changes look correct. Let me verify the final state of the modified files and submit:
Assistant
The user wants me to submit my changes. I've already made the necessary fixes to resolve the issue with gRPC's ManagedChannelImpl log messages containing unsubstituted placeholders. Let me submit the changes now.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.