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 this issue. The problem is that gRPC's ManagedChannelImpl log messages contain unsubstituted placeholders ({0}, {1}) instead of the actual values. This is a logging bridge issue between Java Util Logging (JUL) and SLF4J/Logback.
Let me start by exploring the repository structure to understand how the logging is set up.
Assistant
Let me explore the repository structure more to understand the logging setup.
<tool_call> <function=bash_terminal> <parameter=command> ls -la /arcadedb/ </tool_call>
Assistant
The user wants me to explore the repository structure. Let me run the ls command properly.
Assistant
Now let me look for logging-related files, especially anything related to JUL (Java Util Logging) or logging bridges.
Assistant
Let me look for logging bridge-related files, specifically JUL to SLF4J bridge code:
Assistant
Let me search for files specifically related to JUL or logging configuration/bridges:
Assistant
Let me look at the key logging-related files, especially the ServerLogManager which is likely responsible for the JUL logging setup:
Assistant
Let me check the log configuration files:
Assistant
Let me look at the log formatter classes to understand the issue:
Assistant
Now let me look at the AnsiLogFormatter and the log logger classes:
Assistant
Now I understand the issue. The
LogFormatterusesString.formatted()which expects{}placeholders (SLF4J style), but gRPC's JUL loggers use MessageFormat-style placeholders ({0},{1}). Let me explore more to understand the full picture.Assistant
Let me look at the test file to understand the issue better.
Assistant
Now I understand the issue. The problem is that:
- gRPC uses MessageFormat-style placeholders like
{0},{1} - ArcadeDB's
LogFormatterusesString.formatted()which expects{}placeholders (Java's formatted string syntax) - So when gRPC logs with
{0}and{1}, they don't get substituted becauseString.formatted()doesn't recognize them
Let me check the DefaultLogger class to understand how logging is set up:
- gRPC uses MessageFormat-style placeholders like
Assistant
Now I understand the issue. The problem is:
- gRPC's JUL loggers use MessageFormat-style placeholders like
{0},{1},{2} - ArcadeDB's
LogFormatterusesString.formatted()which expects{}placeholders (Java's printf-style) - When gRPC emits a message like
[{0}] Failed to resolve name. status={1}, the{0}and{1}don't match{}syntax, so they appear literally
Let me check if there are any existing tests related to this and verify my understanding:
- gRPC's JUL loggers use MessageFormat-style placeholders like
Assistant
Now I understand the issue completely. The problem is that gRPC uses MessageFormat-style placeholders (
{0},{1},{2}) but ArcadeDB's logging code usesString.formatted()which expects SLF4J/Java-style placeholders ({}). When gRPC logs messages, the{0},{1}placeholders are never substituted because Java'sString.formatted()doesn't recognize them.Let me write a reproduction script first:
Assistant
I've successfully reproduced the issue and confirmed the fix. The problem is:
- gRPC uses MessageFormat-style placeholders (
{0},{1}) - ArcadeDB's
LogFormatterusesString.formatted()which expects{}placeholders (Java's printf-style) - The result is that
{0},{1}stay literal because.formatted()doesn't recognize them
Now let me apply the fix to the formatter classes. I need to update both
LogFormatter.javaandAnsiLogFormatter.javato usejava.text.MessageFormatinstead ofString.formatted():- gRPC uses MessageFormat-style placeholders (
Assistant
Now let me look at the issue more carefully. The problem is in the
LogFormatterandAnsiLogFormatterclasses which useString.formatted()to format messages. This method expects{}style placeholders (Java's printf-style), but gRPC uses MessageFormat-style placeholders ({0},{1}).Let me check if there are any other places that need fixing:
Assistant
Assistant
Now I understand the issue completely. The problem is:
- gRPC uses MessageFormat-style placeholders (
{0},{1}) - ArcadeDB's
LogFormatterusesString.formatted()which expects{}placeholders - The result is that
{0},{1}stay literal
I need to update the formatter classes to handle both styles of placeholders. The best approach is:
- First try
String.formatted()to handle ArcadeDB's{}syntax - If that doesn't work (still contains
{N}), tryMessageFormat.format()to handle gRPC's{N}syntax
Let me implement the fix.
- gRPC uses MessageFormat-style placeholders (
Assistant
Now let me implement the fix. I'll update the
LogFormatter.javato add a helper method that handles both{}and{N}placeholder styles, then apply the same fix toAnsiLogFormatter.java.Assistant
Let me fix the tool call format. I should use
open --filesyntax.Assistant
Now I understand the issue. The
LogFormatter.customFormatMessage()method usesString.formatted()which expects{}placeholders, but gRPC uses{0},{1}placeholders. I need to update the formatter to handle both styles.Assistant
Let me use a different approach to edit the file:
Assistant
The user wants me to edit the LogFormatter.java file. Let me use the edit command properly with the correct format. I need to add a helper method to handle both SLF4J-style {} and MessageFormat-style {0}, {1} placeholders.
Let me read the current file first and then make the appropriate edits.
Assistant
Now I need to fix the
LogFormatter.javato handle both{}(SLF4J style) and{0},{1}(MessageFormat style) placeholders. Let me write the updated file:Assistant
Now I need to update the
AnsiLogFormatter.javafile with the same fix since it also usesmessage.formatted(additionalArgs):Assistant
Now I need to update
AnsiLogFormatter.javato use the newformatMessage()method from the parent class:Assistant
Now let me verify the changes by creating a test script to confirm the fix works:
Assistant
I need to fix the import in the test -
IllegalFormatExceptionshould bejava.util.IllegalFormatException:Assistant
I see the issue.
String.formatted()doesn't throwIllegalFormatExceptionfor{0},{1}- it just returns the string unchanged. AndString.formatted()uses%sstyle formatting, not{}style. I need a different approach. Let me check ifString.formatted()actually supports{}style placeholders:Assistant
Now I understand!
String.formatted()uses printf-style%splaceholders, NOT{}or{0}placeholders. So I need to handle both cases differently. Let me check how ArcadeDB's own logging works:Assistant
Now I understand the issue completely.
String.formatted()uses printf-style%splaceholders, NOT{}or{0}placeholders. gRPC uses MessageFormat-style{0},{1}placeholders. I need to update theformatMessagemethod to detect which style is used and apply the appropriate formatter.Let me fix the test first to understand what we're dealing with:
Assistant
Now I understand.
String.formatted()uses printf-style%s,%dplaceholders, NOT{}or{0}placeholders. I need to update theformatMessagemethod to:- First check if the message uses MessageFormat-style
{N}placeholders (like gRPC) - If yes, use
MessageFormat.format() - Otherwise, use
String.formatted()for printf-style placeholders (like ArcadeDB's own code)
- First check if the message uses MessageFormat-style
Assistant
All tests pass. Now let me update the LogFormatter.java and AnsiLogFormatter.java with the corrected implementation:
Assistant
Now let me update the AnsiLogFormatter.java to use the same approach:
Assistant
Now let me verify the fix by running the test script again and then running the existing tests:
Assistant
Now let me verify the fix works with the actual LogFormatter class by compiling and running a test against it:
Assistant
Let me clean up the test files and verify the changes with git diff:
Assistant
Let me check the current state of my changes and verify they are correct before running tests.
Assistant
The git diff shows my changes look correct. Let me now verify the fix works properly by running the existing LoggerTest to ensure I haven't broken anything:
Assistant
The maven wrapper seems to have an issue with the HOME environment variable. Let me try using mvn directly or checking if there's an alternative way to run the tests.
Assistant
The user wants me to continue testing my fix. Let me run the existing tests to verify the fix works correctly and doesn't break anything.
Assistant
Let me run the tests with more verbose output to confirm they pass:
Assistant
All 4 LoggerTest tests pass. Let me now compile the project to verify there are no compilation errors, and also clean up the backup file:
Assistant
Let me compile the project to verify the changes are correct:
Assistant
Compilation succeeded. Now let me create a more comprehensive test to verify the fix works end-to-end with the actual LogFormatter class:
Assistant
Let me check the AnsiCode class to fix the test:
Assistant
Let me check the AnsiCode class and fix the test:
Assistant
The user wants me to fix the test file - there's no
setColorsSupportedmethod in AnsiCode. Let me check what methods are available and fix the test accordingly.Assistant
The user wants me to fix the test file - there's no
setColorsSupportedmethod in AnsiCode. I can see thatSUPPORTS_COLORSis a static final field initialized based on theansiSupportsystem property. Let me fix the test to work around this.Actually, looking at the code more carefully, I see that the
SUPPORTS_COLORSisfinal, so I can't change it at runtime. But theformatmethod takes asupportsColorsparameter, so I can use that. Let me rewrite the test to use the correct approach.Assistant
All tests pass. Now let me clean up the test files and run the existing tests to ensure nothing is broken:
Assistant
The user wants me to continue working on the issue. I've successfully fixed the LogFormatter and AnsiLogFormatter to handle both gRPC-style {0}, {1} placeholders and printf-style %s placeholders. All tests pass. Now I should clean up and submit my changes.
Assistant
Good, the test files are cleaned up. Let me verify the final state of my changes and run a broader set of tests to ensure everything works correctly.
Assistant
Let me verify my changes are complete and correct before submitting.
Assistant
Let me run the existing LoggerTest again to confirm everything still works and then submit my changes.
Assistant
All existing tests pass. Let me submit my changes now.
Assistant
The user wants me to submit my changes. Let me use the submit command to finalize the solution.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.